How to Empty a Table in MS SQL 7.0
I have a Table within MS SQL 7.0 that I need to empty the 47,000 records out of. I am wondering if there is a script or query that I can run to do this. I do not want to have to remove these manually.
Thanks
Networks
I have a Table within MS SQL 7.0 that I need to empty the 47,000 records out of. I am wondering if there is a script or query that I can run to do this. I do not want to have to remove these manually.
Thanks
by pramodpatil
Based on your requirement, Use either "Trucate Table" or 'Delete from" SQL Statments.
I am assuming that you need to "empty" the complete table. then you have a choice of above.
Otherwise use Delete conditionally.
Following is the difference between two commands in short,
Use ?TRUNCATE TABLE? statement instead of ?DELETE? clause if you want to delete all rows from a table. It is much faster then ?DELETE? statement without any conditions. ?TRUNCATE TABLE? frees all the space occupied by that table's data and indexes, without logging the individual row deletes.
Poster rated this answer.
This discussion is closed to new replies.
Sort by Trending