Sample Header Ad - 728x90

Using “OR” in SQL

0 votes
1 answer
39 views
I am new to sql and today my manager asked me to retrieve some customres informations using their customer ID so i used the following query: SELECT * FROM Customers WHERE CustID = “11023” or CustID = “11045” or CustID = “11001” or CustID = “101989”; It did work but i wonder if there is a better way to do it.
Asked by Omar (3 rep)
Jul 8, 2021, 11:15 AM
Last activity: Jul 8, 2021, 12:28 PM