HOW TO USE WHERE CLAUSE IN SQL?

266 viewsSQLSQL
0

HOW TO USE WHERE CLAUSE IN SQL?

Saraswat World Changed status to publish June 14, 2023
0
WHERE in SQL
WHERE in SQL
WHERE

WHERE clause in SQL is a data manipulation language (DML) statement. WHERE clause is used in filter the records based on satisfying specific condition(s).

Syntax-

SELECTย column_name1, column_name2, โ€ฆcolumn_nameN

FROMย <table_name>

WHEREย <condition>;

Example-

SELECTย CustomerNameย FROMย Customers

WHEREย Country=โ€˜Germanyโ€™;

Description-

The records having values from column_name1, column_name2, โ€ฆcolumn_nameN will be filtered and retrieved from table_name on meeting the condition provided with WHERE clause. Above example will provide the name of customers from column CustomerName where value in corresponding column matches to Germany.

Note-

Northwind sample database is used for example.

Saraswat World Changed status to publish June 14, 2023
Write your answer.

Posted

in

Tags:

Comments

Leave a Reply

A Tribute to Dilip Kumar