Forum Moderators: open
So with a simple example
orderStatus can be
Order Started
In Production
Paid
Shipped
What is the shortest way to select certian orderStatuses in a select statment.
Right now i have:
SELECT * FROM orders WHERE orderStatus = 'Order Started' OR orderStatus = 'In Production' OR orderStatus = 'Paid';
Is there a way to only refer to the "orderStatus" column once and give it a bunch of different possible values? The following syntax dosn't work but this would be the idea
SELECT * FROM orders WHERE orderStatus = ('Order Started','In Production','Paid');
I know it dosn't seem to be a huge time saver in this example, but if i have dozens of different statuses and several selects every script it adds up.
Thanks,
Ryan