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.
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
i hope this article will help to you.