LIKE operator in SQL Server
Usage of LIKE in SQL Server:
If
we want to get the data which is partially matching then we need to use LIKE
operator.
Example:
Get
the list of employees whose name is starting with A
SELECT
*
FROM
dbo.Employee
WHERE
EmployeeName LIKE 'A%'
Get the list of employees whose name is ending with K
SELECT
*
FROM
dbo.Employee
WHERE
EmployeeName LIKE '%K'
Labels: like operator in sql, regular expressions in sql, SQL Basics, usage of like, WHERE clause in SQL, where in sql
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home