Microsoft
Software
Hardware
Network
Question : SQL Best way to delete multiple records from a database
If I have a table that has a million records. And I also have a text file list of one field in those records that is unique. Lets call it ID. What is the best SQL statement to do a delete for those records? Do I have to make a second lookup table or can i simple do something like:
DELETE FROM table_name
WHERE ID = {value1, value11, value34, value39}
the values are not consequtive so wondering if i can just paste all the values in the where statement or not nad what the connotation would be.
Answer : SQL Best way to delete multiple records from a database
DELETE FROM table_name
WHERE ID = in (value1, value11, value34, value39)
Random Solutions
Attachments to GroupWise
No permissions for Database, but have .mdw file. How can I edit it t gain acces to Db?
Visual Studio 2008 C# XNA - Creating a timer sequence for updated objects
Problem using WITH XMLNAMESPACES with nested queries
How to use CreateFile and WriteFile functions from "kernel32" in VB.NET ?
How to calculate 25th percentile on an Access report
how to create tables in SQL Server 2008
OL2k3: Unable to open your default e-mail folders. The information store could not be opened.
OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction
form set focus vb.net