LIKE operator

Download sql eBook

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

Related Examples

Stats

373 Contributors: 21
Friday, December 23, 2016
Licensed under: CC-BY-SA

Not affiliated with Stack Overflow
Rip Tutorial: info@zzzprojects.com

Download eBook