SQL Tutorial – 23: The LIKE Operator and Wildcard Characters




In this tutorial we’ll check out a few examples of the LIKE Operator along with the wildcard characters (% and _).

Original source


8 responses to “SQL Tutorial – 23: The LIKE Operator and Wildcard Characters”

  1. Thanks for the vid. I was just trying this, and saw i was doing it right. But i was trying to pull data from a column that doesn't exist within that table. But i still have a question. I'm trying to make a search system, but i want to look up the LIKE search term in two columns instead of one. But it's not working on two columns, can you tell me what i'm doing wrong here? 
    Like this:
    1st try: SELECT * FROM game_collection WHERE console='$system' AND title OR description LIKE '%$search%'; 
    2nd try: SELECT * FROM game_collection WHERE console='$system' AND title, description LIKE '%$search%'; 

Leave a Reply