0% found this document useful (0 votes)
9 views

Javatpoint.com-DBMS SQL Operator - Javatpoint

Uploaded by

Pawan Dhiwar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views

Javatpoint.com-DBMS SQL Operator - Javatpoint

Uploaded by

Pawan Dhiwar
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

DBMS SQL Operator - javatpoint

javatpoint.com/dbms-sql-operator

SQL Operator
There are various types of SQL operator:

SQL Arithmetic Operators


Let's assume 'variable a' and 'variable b'. Here, 'a' contains 20 and 'b' contains 10.

Operator Description Example

+ It adds the value of both operands. a+b will


give 30

- It is used to subtract the right-hand operand from the left- a-b will
hand operand. give 10

* It is used to multiply the value of both operands. a*b will


give 200

/ It is used to divide the left-hand operand by the right-hand a/b will


operand. give 2

% It is used to divide the left-hand operand by the right-hand a%b will


operand and returns reminder. give 0

1/3
SQL Comparison Operators:
Let's assume 'variable a' and 'variable b'. Here, 'a' contains 20 and 'b' contains 10.

Operator Description Example

= It checks if two operands values are equal or not, if the (a=b) is


values are queal then condition becomes true. not true

!= It checks if two operands values are equal or not, if values (a!=b) is


are not equal, then condition becomes true. true

<> It checks if two operands values are equal or not, if values (a<>b) is
are not equal then condition becomes true. true

> It checks if the left operand value is greater than right (a>b) is
operand value, if yes then condition becomes true. not true

< It checks if the left operand value is less than right operand (a<b) is
value, if yes then condition becomes true. true

>= It checks if the left operand value is greater than or equal to (a>=b) is
the right operand value, if yes then condition becomes true. not true

<= It checks if the left operand value is less than or equal to the (a<=b) is
right operand value, if yes then condition becomes true. true

!< It checks if the left operand value is not less than the right (a!=b) is
operand value, if yes then condition becomes true. not true

!> It checks if the left operand value is not greater than the (a!>b) is
right operand value, if yes then condition becomes true. true

SQL Logical Operators


There is the list of logical operator used in SQL:

Operator Description

ALL It compares a value to all values in another value set.

AND It allows the existence of multiple conditions in an SQL statement.

ANY It compares the values in the list according to the condition.

BETWEEN It is used to search for values that are within a set of values.

IN It compares a value to that specified list value.

NOT It reverses the meaning of any logical operator.

OR It combines multiple conditions in SQL statements.

EXISTS It is used to search for the presence of a row in a specified table.

LIKE It compares a value to similar values using wildcard operator.

2/3
← prev next →

Latest Courses

© Copyright 2024 Javatpoint. All Rights Reserved.

3/3

You might also like