in condition in mysql 1

in condition in mysql

//Syntax
SELECT * FROM `tableName` WHERE `ColumnName` IN (Value1,Value1,Value1);

//Example:
SELECT * FROM `members` WHERE `membership_number` IN (1,2,3);

Here is what the above code is Doing:
1. Select all the columns from the members table.
2. Where the membership_number is in the list of 1,2,3.

Similar Posts