SQL, selecting items with specific pattern | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

SQL, selecting items with specific pattern

I would like to select all names contain letter ā€˜gā€™ from a table, the names can be started with g, g in between or end with g. Which query is most suitable? Query 1: SELECT * FROM table WHERE Name LIKE ā€˜%g%ā€™; Query 2: SELECT * FROM table WHERE Name LIKE (ā€˜g%ā€™ OR ā€˜%g%ā€™ OR ā€˜%gā€™);

3rd May 2019, 1:39 AM
Poo
0 Answers