Navigate Select ESC Close

String Functions in MySQL | Intermediate MySQL Series

2024-01-30 Education
184.7k
3.1k
90
Alex The Analyst
Alex The Analyst
1.4m subscribers

Unlock all features

FREE: Get instant access to 10 AI summaries, chats, or transcripts per day.

Description

Full MySQL Course: https://www.analystbuilder.com/courses/mysql-for-data-analytics In this lesson we are going to take a look at String Functions in MySQL! GitHub Code: https://github.com/AlexTheAnalyst/MySQL-YouTube-Series/blob/main/Intermediate%20-%20String%20Functions.sql ____________________________________________ SUBSCRIBE! Do you want to become a Data Analyst? That's what this channel is all about! My goal is to help you learn everything you need in order to start your career or even switch your career into Data Analytics. Be sure to subscribe to not miss out on any content! ____________________________________________ RESOURCES: Coursera Courses: 📖Google Data Analyst Certification: https://coursera.pxf.io/5bBd62 📖Data Analysis with Python - https://coursera.pxf.io/BXY3Wy 📖IBM Data Analysis Specialization - https://coursera.pxf.io/AoYOdR 📖Tableau Data Visualization - https://coursera.pxf.io/MXYqaN Udemy Courses: 📖Python for Data Science - https://bit.ly/3Z4A5K6 📖Statistics for Data Science - https://bit.ly/37jqDbq 📖SQL for Data Analysts (SSMS) - https://bit.ly/3fkqEij 📖Tableau A-Z - http://bit.ly/385lYvN *Please note I may earn a small commission for any purchase through these links - Thanks for supporting the channel!* ____________________________________________ BECOME A MEMBER - Want to support the channel? Consider becoming a member! I do Monthly Livestreams and you get some awesome Emoji's to use in chat and comments! https://www.youtube.com/channel/UC7cs8q-gJRlGwj4A8OmCmXg/join ____________________________________________ Websites: 💻Website: AlexTheAnalyst.com 💾GitHub: https://github.com/AlexTheAnalyst 📱Instagram: @Alex_The_Analyst ____________________________________________ *All opinions or statements in this video are my own and do not reflect the opinion of the company I work for or have ever worked for*

Top Comments (10)

@aalanaa 2024-10-03

string functions are used to manipulate and work with text strings. common string functions with real-world uses: - CONCAT(): Combines multiple strings into one (e.g., full names). - LENGTH(): Returns the length of a string (e.g., checking password length). - LOWER()/UPPER(): Converts a string to lowercase or uppercase (e.g., email validation). - SUBSTRING(): Extracts part of a string (e.g., area codes). - TRIM(): Removes extra spaces (e.g., cleaning user input). - REPLACE(): Replaces occurrences of a substring (e.g., updating city names).

83 6 replies
@abdeSaves 2024-10-30

**Summary:** - `length(str)`: (int) Length of `str`. - `upper(str)`: (str) `str` converted to uppercase. - `lower(str)`: (str) `str` converted to lowercase. - `trim(str)`: (str) `str` trimmed from both ends. - `rtrim(str)`: (str) `str` trimmed from the right. - `ltrim(str)`: (str) `str` trimmed from the left. - `left(str, n)`: (str) The first `n` characters of `str`. - `right(str, n)`: (str) The last `n` characters of `str. - `substring(str, n, m)` (also `substr()`): (str) An `m`-long substring starting at the `n`-th character of `str`. - `replace(str, sub1, sub2)`: (str) `str` with all instances of `sub1` replaced with `sub2`. - `locate(sub, str)`: (int) Position of `sub` in `str` (1-based index). - `concat(str1, str2, ...)`: (str) Concatenation of `str1` and `str2`. ------------------------------------ **Bonus:** - `instr(str, sub)`: (int) Position of `sub` in `str` (1-based index). ---------------------------------------- Please let me know if there is anything wrong. Thanks!

80 1 replies
@SetYourBarTo10 2024-01-30

Starting the day with a cup of coffee and Alex the Analyst. Feeling good about today.

65 1 replies
@benny9794 2024-07-25

I love when you specify when you actually use which functions at your real world job and when functions are less used. Gives a good idea of what is to come in a job

61 1 replies
@muhammadintesar3023 2025-04-27

Lesson#11 Conclusion So we have covered multiple string functions 1.LENGTH ==> This will calculates the total no. of characters present in the desired output 2.UPPER ==> To convert all the characters to uppercase form. 3.LOWER ==> To convert all the characters to lowercase form. 4.TRIM ==> Removes unwanted blank spaces from left and right. *LTRIM ==> Removes unwanted blank spaces from left side only. *RTRIM ==>Removes unwanted blank spaces from lright side only. 5.LEFT ==> To select specific character starting from the left side. 6.RIGHT ==>To select specific character starting from the right side. 7.SUBSRING ==> To select specific characters by mentioning start and end points. 8.REPLACE ==> To replace specific character with the desired character. 9.LOCATE ==> This will locate specific characters with 0 if not found 1 if found. 10.CONCATE ==> This will combine the characters of 2 different coloumns. SUBSTRING & CONCAT both string functions are very important and widly used in real world projects.

14 1 replies
@Adeola_Adegbesan 2024-01-30

Awesome session. I love the functionalities of these strings in data cleaning. Thanks Alex!

10
@HeinHtetAung-s9y 2024-08-17

Very effective lesson with direct key points. Really appreciate your effort, Alex

6
@familyguy2747 2025-05-30

if anyone watching this right now, I would like to add one more -- CAST (x,y) x= value: y=datatype(signed(-inf - +inf), unsigned(0 - +inf), string, decimal etc.) helps to solve problems such as replacing numerical values in the dataset if any typo occurs, hope it helps : )

4
@Savanah-u9x 2025-02-07

I'll definitely be coming back to this to remind myself about Locate, etc. Useful and direct as usual - thank you. I'd love a video on numeric functions when you have time <3

1
@Bjellica 2024-01-30

Hi, Alex. Appreciate all you work here. Could you make a video regarding procedures and some use cases?

1

Unlock the Data Inside
Turn Videos into Knowledge

  • Get FREE 10/day: transcripts, summaries, chats
  • Chat with videos, export text & PDF
  • $1 free API credit for RAG, chatbots & research

Free forever plan • All features unlocked

App screenshot