T-SQL Tutorial

SQL Where


Where Syntax:

SELECT column_name(s)
FROM table_name
WHERE condition ;

Store table:

OBJECT_IDPRICE
1200
2500
3900
4500

Example 1:

SELECT * FROM store
WHERE price = 500;

OBJECT_IDPRICE
2500
4500

Example 2:

SELECT * FROM store
WHERE price > 500;

OBJECT_IDPRICE
3900