You'd like to display the substring between indexes 2 and 6 (inclusive). SUBSTRING(email, 1, 7) will return the substrings of the values in the email column that start at the first character and go for seven characters. This means the first character has index 1, the second character has index 2, etc. Watch out! Unlike in some other programming languages, the indexes start at 1, not 0. The third argument is the length of the substring. The second argument is the index of the character at which the substring should begin. The first argument is the string or the column name. You'd like to display the first seven characters of each email. In the emails table, there is an email column. You have a column of strings, and you'd like to get substrings from them.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |