+ 1
SQL
I am new to SQL. I am writing a script to select all last names in database student that ends with upper case T And is at least 3 characters long in length. I know for upper case letter is SELECT * FROM Student WHERE StudentLastName LIKE ā%Sā; But what about length? Please help!
8 Answers
+ 4
Knowledge Is Power
You can use len function
len(name) >= 3
+ 1
Knowledge Is Power
In Feed Posts
+ 1
Knowledge Is Power
Do you see Posts in your profile?
+ 1
Got it AĶ¢J I just posted there. Thank youš
+ 1
Hey. Use
SELECT * FROM STUDENT WHERE STUDENTLASTNAME LIKE ā%Tā
To get the data that ends with T
0
AĶ¢J Do you how can i share ERD diagram at Sololearn?
0
AĶ¢J where is feed post. I see Q&A and code playground. Where is feed post?
0
The ? symbol can be used as a wildcard placeholder that represents 1 unknown character. Change the LIKE clause to look like this:
StudentLastName LIKE '%??T'