![]() ![]() A good example is when you want to show only the year of the employment start date. You can omit the length argument in SUBSTRING(), and the function still works. This returns the desired result: 3: Substring Without the Length Argument Getting the first two letters from the email address means the substring starts at the first character for a length of two characters. ![]() I specify the column email in the function. SUBSTRING(email, 1, 2) AS employee_initials I use the column email since I know the first two letters of the email address are the initials: ![]() I want to find the initials of all employees. You can also use it on a column of a table. Here are the first several rows for you to get a sense of the data: Sales Sales Sales ManagerĪs you can imagine, writing the string expression explicitly is not the only way to use SUBSTRING().
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |