Operators in MySQL
Hello and
welcome everyone. In this article we will learn about Operators in MySQL. Let’s
go.
MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/
C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/
Web API 2- .Net Core In depth In 5 Hours
click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/
MySQL operators compare two or more expressions and it
returns true if the expressions are true. There are many operators available in
MySQL like assignment operators, logical operators, arithmetic operators,
bitwise operators and many more. Now we will see in details operators.
Following
are the various types of operators available in MySQL:
1. Logical Operators
2. Arithmetic Operators
3. Bitwise Operators
4. Assignment Operators
5. Comparison Operators
1.
Logical Operators
AND ( &&)
It is a logical AND (&&)
operator. If the all conditions are true, then AND separated by true
conditions.
BETWEEN
The between operators check value is
within a range of values.
IN
The IN operator check value is present
or not in list.
LIKE
The LIKE operator simple pattern
matching operator with % and _.
NOT ( ! )
The NOT (!) operator negates values or
display a record if the conditions is not true.
OR ( || )
It is a logical OR ( || ) operator and
it is a non-standard MySQL extension.
2.
Arithmetic Operators
Add ( + )
It
is an addition operator in MySQL.
Subtract ( - )
It
is a minus operator in MySQL.
Multiply ( * )
It
is a multiplication operator in MySQL.
Divide ( / )
It
is a division operator in MySQL.
Modulo ( % )
It
is modulo operator in MySQL.
3.
Bitwise Operators
AND ( & )
It
is a bitwise AND operator.
OR ( | )
It
is a bitwise OR operator.
Exclusive OR ( ^ )
It
is a bitwise exclusive OR operator.
4.
Assignment Operators
=
Assignment
operator is a part of a SET statement and also part of the SET clause in an
UPDATE statement. It Assign a value.
:=
This
operator assigns a value.
5.
Comparison Operators
Equal to ( = )
It
is an equal to and comparison operators.
Greater than ( > )
It
is a greater than operators.
Less than ( < )
It
is a less than operator.
Greater than or equal to ( >= )
It
is a greater than or equal to operator.
Less than or equal to ( <= )
It
is a less than or equal to operator.
Not equal to ( <> )
It
is a not equal to operator.
In this article, we are learned about assignment
operators, logical operators, arithmetic operators, bitwise operators.
MongoDB with .Net Core course link => https://www.udemy.com/mongodb-with-net-core-sagar-jaybhay/
C# basic course click on: https://www.udemy.com/learn-csharp-with-sagar-jaybhay/
Web API 2- .Net Core In depth In 5 Hours
click on: https://www.udemy.com/web-api-2-net-core-in-depth-in-5-hrs-with-sagar-jaybhay/
Visit our site: https://expertwithsagarjaybhay.com/
Comments
Post a Comment