• Welcome to SQLitening Support Forum.
 

News:

Welcome to the SQLitening support forums!

Main Menu

SQL question regarding WHERE clause

Started by Bern Ertl, March 08, 2010, 06:55:19 PM

Previous topic - Next topic

Bern Ertl

I'm stuck in slow gear this afternoon.  I've got a DELETE operation that will be encompassing multiple records in one call.  I'm currently defining it like so:

DELETE FROM table WHERE RowID = 3 OR RowID = 6 OR RowID = 7

etc. Is there a better/preferred syntax for the WHERE clause in this statement?

Fred Meier

I use the In expression whenever I have a list of values to match.
Delete From table Where RowID In(3, 6, 7)


Bern Ertl

Thanks Fred.  That looks much better.