Collections:
Deleting Multiple Rows with One DELETE Statement in SQL Server
How To Delete Multiple Rows with One DELETE Statement in SQL Server?
✍: FYIcenter.com
You can delete multiple rows from a table in the same way as deleting a single row, except that the WHERE clause will match multiple rows. The tutorial exercise below deletes 3 rows from the fyi_links table:
-- view rows to be deleted SELECT id, url, notes, counts FROM fyi_links WHERE id > 300 GO id url notes counts 801 moc.retneciyf.ved Wrong 1202 802 moc.retneciyf.abd Wrong 1204 803 moc.retneciyf.aqs Wrong 1206 -- delete multiple rows DELETE FROM fyi_links WHERE id > 300 GO (3 row(s) affected) -- try to view the deleted row SELECT id, url, notes, counts FROM fyi_links WHERE id > 300 GO no rows
⇒ Deleting All Rows with DELETE Statements in SQL Server
⇐ Deleting an Existing Row with DELETE Statements in SQL Server
2016-10-30, 2347🔥, 0💬
Popular Posts:
How to download and install Microsoft .NET Framework Version 2.0 in SQL Server? .NET Framework Versi...
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administr...
How To Change the Name of a Database User in SQL Server? If you want to change the name of an existi...
How to obtain the number of rows found by the last SELECT statement using the FOUND_ROWS() function?...
How To Look at the Current SQL*Plus System Settings in Oracle? If you want to see the current values...