If I want to delete as many as 30k rows in a table in TSQL,
I can’t use
delete from myTable where Id in (1,2,3,...,30k)
because the number of IDs in the IN clause is too big, according to this article http://support.microsoft.com/kb/288095
But how can I rewrite my query to delete the rows using a temporary table and table joins?
EDIT: The IDs are not in order. They are picked by certain logic so they are just some arbitrary IDs in myTable.
* IF IT IS A QUERY INSIDE ANOTHER QUERY *****