

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How can we use two columns with MySQL WHERE clause?
It is very rarely used to use two columns of the same table in WHERE clause but still we can perform a query with two columns of the same table. Consider the below example −
mysql> Select F_name, L_name -> From Customer -> where F_name = L_name; Empty set (0.00 sec)
Here we are using both the columns(F_Name and L_Name) from the same table(Customer) hence the result is an Empty set.
- Related Questions & Answers
- How Can we use MySQL DISTINCT clause with WHERE and LIMIT clause?
- How can we use MySQL INSTR() function with WHERE clause?
- How can we use ASCII() function with MySQL WHERE clause?
- How can we use CHAR_LENGTH() function with MySQL WHERE clause?
- How can we use BIN() function with MySQL WHERE clause?
- How can we use FIND_IN_SET() function with MySQL WHERE clause?
- How can we use WHERE clause with MySQL INSERT INTO command?
- Can we use WHERE clause inside MySQL CASE statement?
- How can I use SPACE() function with MySQL WHERE clause?
- Can we fetch multiple values with MySQL WHERE Clause?
- Can we use MySQL GROUP BY clause with multiple columns like MySQL DISTINCT clause is used?
- How to use MySQL VIEW with WHERE clause?
- How can we use MySQL SUM() function with HAVING clause?
- How can we use a MySQL subquery with FROM clause?
- How can we use MySQL REVERSE() function on column’s data along with WHERE clause?
Advertisements