SQL Comparison operator

OBJECTIVE

In this chapter you will learn:

What is Comparison operator?
Types of Comparison operator
Examples of Comparison operator

 

What is Comparison operator?

The comparison operator is used to compare between two operands or expression except text, ntext or image. Comparison operator is mostly used with “where” clause to filter the records.

Types of Comparison operator

 

Comparision OperatorUse
=Equals to
>Greater than
<Less than
>=Greater than or equal to
<=Less than or equal to
<> !=Not equal to
!<Not less than
!>Not greater than

Example

Output

comparison operator example
Example Description

In the above example only such type of records has displayed which has the sales quotes value is more than 100000. You can see in the output, all the sales quota value is greater than 100000
SUMMARY

In this chapter we have learned comparison operator and it’s type with examples. In the next chapter you will learn about logical operater and its type.


Leave a Reply

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