SQL LIKE operator

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Syntax

  • Wild Card with % : SELECT * FROM [table] WHERE [column_name] Like '%Value%'

    Wild Card with _ : SELECT * FROM [table] WHERE [column_name] Like 'V_n%'

    Wild Card with [charlist] : SELECT * FROM [table] WHERE [column_name] Like 'V[abc]n%'

Remarks

LIKE condition in WHERE clause is used to search for column values that matches the given pattern. Patterns are formed using following two wildcard characters

  • % (Percentage Symbol) - Used for representing zero or more characters
  • _ (Underscore) - Used for representing a single character


Got any SQL Question?