Operators: An operator is a
symbol specifying an action that is performed on one or more expressions. The
lists the operator categories that SQL Server supports:
-Arithmetic
Operators
-Assignment
Operator
-Comparison
Operators
-Logical
Operators
-Concatenation
Operator
Arithmetic Operators: Arithmetic
operators perform mathematical operations on two expressions of one or more of
the data types of the numeric data type category. Those are:
+ - Addition
- - Subtraction
* - Multiplication
/ - Division
% - Modulo
Assignment Operators: The equal
sign (=) is the only assignment operator.
Comparison Operators: Comparison
operators test whether two expressions are the same. Comparison operators can
be used on all expressions except expressions of the text, ntext,
or image data types. Those are:
= - Equal
to
> - Greater
than
< - Less
than
>= - Greater
than or equal to
<= - Less
than or equal to
<> - not
equal to
!= - not
equal to
!< - not
less than
!> - not
greater than
Logical Operators: Logical
operators test for the truth of some condition. Logical operators, like
comparison operators, return a Boolean value of TRUE or FALSE.
Those are:
- ALL TRUE
if all of a set of comparisons are TRUE
- AND TRUE
if both Boolean expressions are TRUE
- ANY TRUE
if any one of a set of comparisons are TRUE
- BETWEEN TRUE
if the operand is within a range
- EXISTS TRUE
if a subquery contains any rows
- IN TRUE
if the operand is equal to one of a list of expressions.
- LIKE TRUE
if the operand matches a pattern
- NOT Reverses
the value of any other Boolean operator
- OR TRUE
if either Boolean expression is TRUE
- SOME TRUE
is some of a set of comparisons are TRUE
String Concatenation Operator:
The plus sign (+) is the string concatenation operator that enables string
concatenation.
<<< Previous Next >>>
<<< Previous Next >>>
No comments:
Post a Comment