Where Clause in sql server


WHERE clause statement is used to filter records.

WHERE clause is use to retrieve those records which matches a predefined condition. Where clause not only use for retriveation also use for update and delete

Where Clause Query

Select * from table_name where condition_here

Where clause Example

  •      Select * from employee where Emp_Name=’Sid’;
  •      Select * from employee where emp_Id =1;


NOTE

Use double quote if you are using text value in where clause and don’t use quotes for numeric field. You can see the example.

Operators in where clause

These are the operators use in where clause.

Operator
=
Equal
<> 
Not equal
> 
Greater than
< 
Less than
>=
Greater than or equal
<=
Less than or equal
BETWEEN
Between
LIKE
Search for a pattern
IN
To specify multiple possible values for a column

Comments

Popular posts from this blog

Disable right click, Inspect Element and page source using JavaScript in Html and asp.net

Like Operator In Sql Server