Monday, March 19, 2012

data deletion

How Is it possible to delete data from table leaving the tables intact?If you mean all the data you can use DELETE by itself or if you don't have
any referential integrity you can use TRUNCATE TABLE. I would advise making
sure you have valid backups first.
Andrew J. Kelly SQL MVP
"albren" <anonymous@.discussions.microsoft.com> wrote in message
news:CC67A65A-1AE4-4B82-9388-9DF0FE58A3CE@.microsoft.com...
> How Is it possible to delete data from table leaving the tables intact?|||Hi,
2 options,
1. Delete with out a condition
eg: DELETE from <tablename> or DELETE <Tablename>
2. Truncate command(This will be much faster bacause it is a non logged
operation)
eg: TRUNCATE table <tablename>
Thanks
Hari
MCDBA
"albren" <anonymous@.discussions.microsoft.com> wrote in message
news:CC67A65A-1AE4-4B82-9388-9DF0FE58A3CE@.microsoft.com...
> How Is it possible to delete data from table leaving the tables intact?

No comments:

Post a Comment