Queries using operators in SQL.
An operator manipulates individual
data items and returns a result. The data items are called operands or
arguments. Operators are represented by special characters or by keywords. For
example, the multiplication operator is represented by an asterisk (*) and the
operator that tests for nulls is represented by the keywords IS NULL. There are
two general classes of operators: unary and binary. Oracle Database Lite SQL
also supports set operators.
Arithmetic
operators in sql:
1. + (unary operator): Makes operand
positive.
2.-(unary operator): Negates
operand.
3. / (Division operator): Division
(numbers and dates)
4. * (Multiplication operator): Multiplication
Comparison
operators:
a) Equal to Operator (=):
Checks if the values of two operands are equal or
not, if yes then; condition becomes true.
2.Not Equal to
Operator(!=): Checks if the
values of two operands are equal or not, if values are not equal then;condition
becomes true.
3.Greater than
Operator(>): Checks if the
value of left operand is greater than the value of right operand, if yes then
condition becomes true.
4.Less than Operator
(<):Checks if the value of
left operand is less than the value of right operand, if yes then condition
becomes true.
4.Greater than or Equal
to Operator (>=): Checks if the
value of left operand is greater than or equal to the value of right operand,
if yes then condition becomes true.
Logical operators:
a)ALL Operator: The ALL operator is used to compare a value to all values
in another value set.
b)AND Operator: The ALL operator is used to compare a value to all values
in another value set.
c) ANY Operator: The ANY operator is used to compare a value to any
applicable value in the list as per the condition.











No comments:
Post a Comment