VOOZH about

URL: https://www.geeksforgeeks.org/sql/where-clause-in-ms-sql-server/

⇱ Where clause in MS SQL Server - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Where clause in MS SQL Server

Last Updated : 9 Jun, 2020
In this article, where clause will be discussed alongside example. Introduction :
  1. To extract the data at times, we need a particular conditions to satisfy.
  2. 'where' is a clause used to write the condition in the query.
Syntax :
select select_list
from table_name
where condition
A example is given below for better clarification - Example : Sample table: Student If a user wants to extract the name of the student who is pursuing Mechanical, the query is as follows:
select name
from student
where course='Mechanical' 
The output is - 'where' condition filters only the rows that are evaluated to true. If the condition evaluates to false or unknown, the rows will not be filtered causing an error.
Comment
Article Tags: