πŸŽ“ Computer Science & Engineering Portal

Master Engineering Disciplines with Structured Notes

Comprehensive academic lecture notes, exam-oriented unit summaries, laboratory manuals, and previous year question papers designed strictly for university students.

πŸ“‘

University Syllabi

AKTU & AICTE aligned semester guidelines.

πŸ“

Exam Question Papers

Previous 5 years solved university papers.

πŸ’‘

Lab Manuals & Viva

Practical codes with outputs & interview Qs.

Core Subjects & Units Hub

Click on any specific unit to immediately view its lecture notes below

Viewing All Lectures

SQL Operator

SQL Operator

There are various types of SQL operator:


DBMS SQL Operator

SQL Arithmetic Operators

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

OperatorDescriptionExample
+It adds the value of both operands.a+b will give 30
-It is used to subtract the right-hand operand from the left-hand operand.a-b will 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 operand.a/b will give 2
%It is used to divide the left-hand operand by the right-hand operand and returns reminder.a%b will give 0

SQL Comparison Operators:

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

OperatorDescriptionExample
=It checks if two operands values are equal or not, if the values are queal then condition becomes true.(a=b) is not true
!=It checks if two operands values are equal or not, if values are not equal, then condition becomes true.(a!=b) is true
<>It checks if two operands values are equal or not, if values are not equal then condition becomes true.(a<>b) is true
>It checks if the left operand value is greater than right operand value, if yes then condition becomes true.(a>b) is not true
<It checks if the left operand value is less than right operand value, if yes then condition becomes true.(a<b) is true
>=It checks if the left operand value is greater than or equal to the right operand value, if yes then condition becomes true.(a>=b) is not true
<=It checks if the left operand value is less than or equal to the right operand value, if yes then condition becomes true.(a<=b) is true
!<It checks if the left operand value is not less than the right operand value, if yes then condition becomes true.(a!=b) is not true
!>It checks if the left operand value is not greater than the right operand value, if yes then condition becomes true.(a!>b) is true

SQL Logical Operators

There is the list of logical operator used in SQL:

OperatorDescription
ALLIt compares a value to all values in another value set.
ANDIt allows the existence of multiple conditions in an SQL statement.
ANYIt compares the values in the list according to the condition.
BETWEENIt is used to search for values that are within a set of values.
INIt compares a value to that specified list value.
NOTIt reverses the meaning of any logical operator.
ORIt combines multiple conditions in SQL statements.
EXISTSIt is used to search for the presence of a row in a specified table.
LIKEIt compares a value to similar values using wildcard operator.

Labels: ,

Discussion & Queries (<$I18NNumComments$>):

<$CommentPager$>
<$I18NAtCommentTimeWithPermalink$>, <$I18NCommentAuthorSaid$>

<$BlogCommentBody$>

<$BlogCommentDeleteIcon$>
<$CommentPager$>