SQL Tutorials - 8.System Functions_1 - LEN / LEFT / RIGHT / SUBSTRING / CHARINDEX

preview_player
Показать описание
In this tutorial we will learn how to use the system function in SQL, and we will talk about :

1. LEN Function: Return the length of the value

2. LEFT Function : Return the left part of the character with specified number

3. Right Function : Return the right part of the character with specified number

4. Substring Function : Return the substring starting at the position specified by number

5. Charindex Function : Used to search for an expression with another expression and return
its started position if found

Last but not the least, SUBSCRIBE to my YouTube channel to stay updated about the regularly uploaded new videos.

Рекомендации по теме
Комментарии
Автор

Thank you. Your video is very helpful as i am trying to learn SQL. I have a question. what if i have a column (Location) with (Los Angeles, CA) i want to make 2 columns(City) +(State) out this one column. how can you transfer values from Location to these new columns using substring?

alia
Автор

unrelated to the video but relevant to the video where you separate first and last names, what do you do if there are no marks or characters between your first and last names, especially when the first and last names in your columns have different lengths if you specify the number of letters to be returned in the right or left columns, it may undesired consequences, for example if you return three characters but the lenght of the first name is maybe five characters and the next one is six, and so on, how do you only return the first name or last name...

Vanguardclass