91-9990449935 0120-4256464 |
MySQL OR ConditionThe MySQL OR condition specifies that if you take two or more conditions then one of the conditions must be fulfilled to get the records as result. Syntax: Parameter explanationcondition1, condition2, ... condition_n: Specifies all conditions that must be fulfilled for the records to be selected. MySQL OR ExampleThe following example specifies how to use the OR condition in MySQL with SELECT statement. Consider a table "cus_tbl", having the following data: Execute the following query: Output: Note: In the above example you can see that the second condition "cus_id" is wrong but the query is displaying the correct result because of the OR condition.
Next TopicMySQL AND OR
|