SQL Server LIKE Condition (Operator)SQL Server LIKE condition or operator is used to perform pattern matching. It is used with WHERE clause and SELECT, INSERT, UPDATE and DELETE statement. Syntax: Parameter Explanationexpression: It is a character expression like a column or field. pattern: It is a character expression that contains pattern matching. Following is a list of patterns used with LIKE operator:
LIKE Operator using % wildcard (percent sign wildcard)Example: You have a table named "Students", having the following data: Let's use % wildcard with SQL Server LIKE condition. Here we retrieve all of the students from "Student" table whose name begins with 'L'. Output: Or LIKE Operator using [ ] wildcard (square brackets wildcard)Let's use [] wildcard with SQL Server LIKE condition. Note:
|