+ 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â);
1 Answer