↑ Return to General SQL Commands

Print this Page

SQL Where

How to use where clause in SQL?

We may want to only retrieve stores with sales above $1,000. To do this, we use the WHERE keyword.

The syntax is as follows:

SELECT “column_name”
FROM “table_name”
WHERE “condition”

For example, to select all stores with sales above $1,000 in Table Store_Information,

Table Store_Information

store_name Sales Date
Los Angeles $1500 Jan-05-1999
San Diego $250 Jan-07-1999
Los Angeles $300 Jan-08-1999
Boston $700 Jan-08-1999

Permanent link to this article: http://www.techxpress.in/general-sql-commands/sql-where/

Leave a Reply

Bookmark this page