Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Deleting data from a table?

Status
Not open for further replies.

JasonDBurke

Programmer
Jun 20, 2001
54
US
Is there a quick and dirty way of emptying data from tables without deleting the entire table itself. I'm sure the engineers at Microsoft built that functionality in there but I can't find it anywhere. Thanx for the help,
Jason
 
drop table xxxmeans delete the table as is.
delete from xxx means delete data from table without deleting the table. It means it'll empty the table.

You can also delete selective
delete from xxx
where a = something

will be deleted from table xxx only data where in column a is value something. John Fill
1c.bmp


ivfmd@mail.md
 

Use TRUNCATE TABLE to quickly empty a table in SQL Server.

truncate table mytable Terry L. Broadbent
faq183-874 contains some tips and ideas for posting questions in these forums. Please review it if you have time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top