SQL Operators – SQL Tutorial | Software Testing Material

SQL Operators:

In this post, we see SQL Operators in detail.

SQL Operator is a reserved word used primarily in an SQL statement’s WHERE clause to perform operations, such as arithmetic operations and comparisons. These are used to specify conditions in an SQL statement.

There are are three types of Operators.

  1. Arithmetic Operators
  2. Comparison Operators
  3. Logical Operators

SQL Arithmetic Operators:

Let’s assume two variables “x” and “y”. Here “x” is valued 30 and “y” valued 60.

In SQL, we use Arithmetic operators such as +, , *, /, %.

To add two numbers we use the operator +

Based on the above mentioned values of x and y.

Check the below image for the description of each operator.

SQL Arithmetic Operators

SQL Comparison Operators:

Let’s assume two variables “x” and “y”. Here “x” is valued 30 and “y” valued 60.

In SQL, we use Comparison operators such as =, !=, >, <, >=, <=,<>, !<, !>. Check the below image for the description of each operator.

SQL Comparison Operators

SQL Logical Operators:

In SQL, we use Logical operators such as AND, OR, NOT, IN, BETWEEN, ALL, EXISTS, LIKE. Check the below image for the description of each operator.

SQL Logical Operators

In the next tutorial, we will see How To Create A Database In SQL

Check out the complete SQL Tutorial by clicking on below link:

SQL Tutorial – Complete

Get our latest blog posts delivered to your inbox

Subscribe and get popular blog posts about software testing industry.

Rajkumar

Leave a Comment

Share via
Copy link
Powered by Social Snap