SQL - Queries: SELECT Queries Are The Most Commonly Used SQL
SQL - Queries: SELECT Queries Are The Most Commonly Used SQL
SELECT *
FROM orders
WHERE customer = 'Tizag'
SELECT *
FROM orders
WHERE day_of_order > '7/31/08'
This conditional statement will return only the orders
that have made it into the table since the end of July,
filtering out any orders in the table made prior to July 31st.
SQL Results:
id customer day_of_order product quantity
2008-08-01
1 Tizag Pen 4
00:00:00.000
2008-08-01
2 Tizag Stapler 1
00:00:00.000
2008-08-16 Hanging
3 A+Maintenance 12
00:00:00.000 Files
2008-08-15 19" LCD
4 Gerald Garner 3
00:00:00.000 Screen
SELECT *
FROM orders
WHERE day_of_order > '7/31/08'
AND customer = 'Tizag'
SELECT customer,day_of_order
FROM orders
WHERE day_of_order > '7/31/08'
Sql Equality Operator:
customer day_of_order
Tizag 2008-08-01 00:00:00.000
Tizag 2008-08-01 00:00:00.000
SQL Results:
Addition Subtraction Multiplication Division Modulus
19 11 60 3 3
SELECT (5 / 2) -- = 2.5
SELECT (5 % 2) -- = 1 is the value that will be
returned