Introduction:

 

In this article we will explain how to use WHERE clause in SQL Server or what is WHERE clause

in SQL Server or how to filter record in SQL Server with example.

 

Description:

 

The SQL WHERE clause is used to define a criteria while retrieving the data from the table. When you need to retrieve only necessary records based on filter should use to where clause. WHERE clause is not only used with SELECT statement, it is also used with UPDATE, DELETE statement.

SQL WHERE SYNTAX

SELECT <column-names> FROM <table-name> WHERE <condition>

 WHERE clause with UPDATE statement:

UPDATE <table-name> SET <column-name> = <value> WHERE <condition>

WHERE clause with  DELETE statement:

DELETE <table-name> WHERE <condition>

SQL WHERE CLAUSE EXAMPLES

select s.Name,s.Mobile,s.address1,f.ammount [Amount] from Student as s 
left join Fee f on s.id=f.StudentId where ammount>3000

RESULT:

WHERE clause  in SQL Server

  • i hope this article will help to you.

comments


Leave a comment

Make sure you enter the (*) required information where indicated. HTML code is not allowed.

You may also like