Professional Documents
Culture Documents
BY
AHAMED HASHIR.M
SQL FUNCTIONS
The SQL Server built-in functions are as follows:
Rowset Functions
Aggregate Functions
Ranking Functions
Scalar Functions
SCALAR FUNCTIONS
Scalar functions operate on a single value.
Aggregate functions are frequently used with the GROUP BY clause of the
SELECT statement.
CONTAINSTABLE
OPENQUERY
FREETEXTTABLE
OPENROWSET
OPENDATASOURCE
OPENXML
RANKING FUNCTIONS
Ranking functions return a ranking value for each row in a partition.
Depending on the function that is used, some rows might receive the same
value as other rows.
Ranking functions are nondeterministic.
Ranking functions are as follows:
RANK
NTILE
DENSE RANK
ROW_NUMBER
SQL OPERATORS
The SQL operators can be classified as
COMMON OPERATORS
LOGICAL OPERATORS
MATHEMATICAL OPERATORS
COMMON OPERATORS
OPERATOR DESCRIPTION SYNTAX
+ Addition Value1+Value2
- Subtraction Value1-Value2
* Multiplication Value1*Value2
/ Division Value1/Value2
OPERATOR PRECEDENCE
OPERATOR PRECEDENCE
+ - (Unary) 0
*/ 1
+- 2
= <> 3
< <= 3
> >= 3
[NOT] BETWEEN 3
IS [NOT] NULL 3
[NOT] IN 3
NOT 4
AND 5
OR 6