Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SELECT * FROM TABLE WHERE 1 = 2 [closed]

The query:

Explain SELECT * FROM TABLE WHERE 1 = 2

Displays the field names of the given table. Can anyone explain this syntax? Thanks in advance.

like image 551
Tapas Bose Avatar asked Dec 20 '22 14:12

Tapas Bose


1 Answers

You're returning no results, because 1 = 2 is false. (There are no records that match that WHERE clause, so you just get the table headings, and no records.)

like image 50
John Avatar answered Jan 01 '23 17:01

John