Wednesday 26 June 2013

What are the SQL Predicates

sql - predicates


In previous chapter i have explained How To Use Identifiers, think sql In SQL now i am gonna eplain you What are the SQL Predicates


SQL Predicates are found on the tail end of clauses, functions, and SQL expression inside of existing query statements. We've actually already covered a few SQL predicates already and most on this list should be familiar to you.

SQL Predicates:

AND
OR
LIKE
BETWEEN
AS
TOP(LIMIT)

sql - top

SQL Top is used to limit the number of results returned by a query. The top command is generally followed by a number that indicates the maximum number of results to return for a given query.

SQL Code:

use mydatabase;

SELECT TOP 2 *
FROM orders

SQL Results:

idcustomerday_of_orderproductquantity
1Tizag2008-08-01 00:00:00.000Pen4
2Tizag2008-08-01 00:00:00.000Stapler3

No comments: