I have the following query:
DELETE FROM [DSPCONTENT01].[dbo].[Contact Center]
WHERE [Contact Center] IS NULL
AND [F2] IS NULL
How can I modify the query so after execution ONLY row 15 is still showing and every other row is deleted?
Some other way to delete except the specific row:
DELETE FROM [DSPCONTENT01].[dbo].[Contact Center] WHERE F10 NOT IN (2096)
You can also Select the particular record into a temporary table, then drop the original table and finally copy the data from the temporary table to the original table. Something like this:
create table #ContactCenter as
select * from [DSPCONTENT01].[dbo].[Contact Center] where F10 = 2096
truncate table [DSPCONTENT01].[dbo].[Contact Center]
insert into [DSPCONTENT01].[dbo].[Contact Center]
select * from #ContactCenter
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With