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

Sharing is caring.

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Like This Post?

We have a lot more where that came from?

We only send really good stuff occasionally, promise.

Rajkumar SM

Leave a Comment

Your email address will not be published. Required fields are marked *

Share on facebook
Share on google
Share on twitter
Share on linkedin
Share on whatsapp

Recent Posts:

Scroll to Top
API Testing eBook

DOWNLOAD FOR FREE