- 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
Why is it not recommended to use the mixture of quoted as well as unquoted values in MySQL IN() function’s list?
Actually, MySQL has different comparison rules for quoted values such as strings and unquoted values such as numbers. On mixing the quoted and unquoted values in IN() function list may lead to the inconsistent result set. For example, we must not write the query with IN() function like below −
Select Salary from employee where ID IN(1,’a’,2,3,’c’)
Instead of this the better way to write the above query is as follows −
Select Salary from employee where ID IN(‘1’,’a’,’2’,’3’,’c’)
- Related Articles
- MySQL Quoted table/field names vs unquoted names?
- The 'sea water' can be classified as a homogeneous mixture as well as a heterogeneous mixture? Comment.
- How to concat Values in MySQL Query and to handle Null values as well?
- The ‘sea-water’ can be classified as a homogeneous as well as heterogeneous mixture. Comment.
- Why is it not good practice to use date values with two-digits years in MySQL?
- The chemical reaction involved in the corrosion of iron metal is that of:(a)oxidation as well as displacement(b) reduction as well as combination(c) oxidation as well as combination(d)reduction as well as displacement
- Why is air considered as a mixture?
- How to select multiple max values which would be duplicate values as well in MYSQL?
- Extract gender values as a string when it is stored in the table as a Boolean in MySQL
- Which of the following can make a parallel beam of light when light from a bulb falls on it?(a) concave mirror as well as concave lens (b) convex mirror as well as convex lens(c) concave mirror as well as convex lens (d) convex mirror as well as concave lens
- MySQL ENUM column match for quoted values
- Why algae is not considered as a plant, although it does photosynthesis?
- Though many of the Indian batsmen are match winners then why only MS Dhoni is quoted as the Best finisher?
- Name the component which is found in natural gas as well as in biogas.
- Display duplicate record as a distinct value with corresponding values as distinct comma separated list in MySQL?

Advertisements