MySQL Forums
Forum List  »  MySQL Workbench

OR Operator return all table values
Posted by: Parthiban D
Date: April 30, 2020 05:13AM

HI,

I tried using OR operator without specifying the column name then MYSQL returns all value in Table.

Eg:
Select * from tableName where id =2 or 4;

if I execute this query I should get syntax error right? but I got all rows from the table.

Kindly explain the logic here. thank you in advance

Options: ReplyQuote


Subject
Views
Written By
Posted
OR Operator return all table values
598
April 30, 2020 05:13AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.