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.

Updated on: 2020-06-22T10:56:28+05:30

492 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements