- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Do Double Equal Sign exist in MySQL?
There is no double equal sign concept. It can be used to compare two values. If you use double equal sign(==) in MySQL, you will get an error message.
Let us verify the concept is true or not. Declare a variable −
mysql> set @Number=10; Query OK, 0 rows affected (0.00 sec)
Now, compare the above variable value with 10. If both the values are same then the result will be 1 otherwise 0.
Using double equal sign −
mysql> select 10==@Number;
This will produce the following output i.e. an error −
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '==@Number' at line 1
Let us now change the double equal sign(==) to single equal sign(=) −
mysql> select 10=@Number;
This will produce the following output −
+------------+ | 10=@Number | +------------+ | 1 | +------------+ 1 row in set (0.00 sec)
- Related Articles
- Does NOT EQUAL exist in MySQL?
- How do I use the @ sign in MySQL?
- How do I replace “+”(plus sign) with SPACE in MySQL?
- How do I detect if a table exist in MySQL?
- How do atoms exist?
- How to add approximately equal sign in a plot using ggplot2 in R?
- How do we use double quotation in Python?
- What is the use of EXIST and EXIST NOT operator with MySQL subqueries?
- MySQL pagination without double-querying?
- Convert string (varchar) to double in MySQL
- Implement and set DOUBLE length in MySQL
- What does double underscore prefix do in Python variables?
- Converting boolean values to positive or negative sign in MySQL?
- Changing Column in MySQL from int to double?
- MySQL query to check if multiple rows exist?

Advertisements