SQLite - SPLessons
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

SQLite Operators

SQLite Operators

shape Description

SQLite Operators is a design that instructs the compiler to execute some particular logical manipulation and mathematical operations. Some of the SQLite Operators are obtained by default, for example

Arithmetic operator

shape Description

Arithmetic operators execute one or more numeric values and returns the output of numeric value. The following are the arithmetic operators.
Operator Description Example
+ Perform addition of two numbers A+B,Example 10+5=15
- Perform subtraction of two numbers A-B,Example 10-5=5
* Perform multiplication of two numbers A*B,Example 10*5=50
/ Perform division of two numbers A/B,Example 10/5=2
% Divides left hand operand by right hand operand and give back the result set. B%A will give 0

Comparison operator

shape Description

Comparison Operators of SQLite Operators performs comparisons of one expression to another, thereby giving back a consistent result as NULL,TRUE OR FALSE.
Operator Description Example
= Analyse weather the two esteem are true or False,if true then the case will be true A=B
< Analyse whether left esteem is less than the right esteem,if true the case becomes true. A<B
> Analyse whether the left esteem is greater than the right esteem,if true then the case will be true. A>B
<= Analyse whether the left esteem is less than or equal to right esteem,if yes then case becomes true. A<=B
>= Analyse whether the left esteem is greater than or equal to the right esteem,if true then the case becomes true. A>=B
= Checks if the estimations of two operands are equivalent or not, if yes then condition turns out to be valid. a=b is not valid
Checks if the estimations of two operands are equivalent or not, if qualities are not equivalent then condition turns out to be valid. ab is valid
!= Checks if the estimations of two operands are equivalent or not, if qualities are not equivalent then condition turns out to be valid. (a != b) is valid
!> Checks if the estimation of left operand is not more noteworthy than the estimation of right operand, if yes then condition turns out to be valid. a!>b is true
!< Checks if the estimation of left operand is at the very least the estimation of right operand, if yes then condition turns out to be valid. a!<b is false

Logical operator

shape Description

Logical Operator operates on two operands and returns a boolean output. The accessible logical operators are AND, OR and NOT.
Operator Description
AND It is called as logical AND operator,if two values are true then the case becomes true.
OR It is called as logical OR operator,suppose any one value is true then the case become true.
NOT It is called as logical NOT operator,if a case is true then the logical NOT operator will make it false.
BETWEEN The BETWEEN operator is utilized to look for qualities that are inside an arrangement of qualities, given the base worth and the most extreme quality.
IN The IN operator is utilized to contrast a worth with a rundown of exacting qualities that have been indicated.
LIKE The LIKE operator is utilized to contrast a quality with comparable qualities utilizing trump card administrators.
IS NULL The NULL operator is utilized to contrast a worth and a NULL quality.
IS NOT The IS operator work like !=
|| Includes two distinctive strings and make new one
IS The IS operator work like =
UNIQUE The UNIQUE operator looks each column of a predetermined table for uniqueness.

Bitwise operator

shape Description

Bitwise operator in SQLite Operators performs on bits and executes bit-by-bit operation. Reality table for and | is as per the following.
P Q P&Q P|Q
0 0 0 0
0 1 0 1
1 1 1 1
1 0 0 1

shape Examples

A=0 then negation(~) of A is 1 B=1 then negation(~) of B is 0

Summary

shape Key Points

  • SQLite Operators - It is a design that instructs the compiler to execute some particular operations.
  • Arithmetic operator - Execute one or more numeric values and return the result set.
  • Comparison operator - compares two expressions and return the result set.
  • Logical operator - Operate on two operands and return a boolean output.
  • Bitwise operator - Perform on bits and execute bit-by-bit operations.