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!

Delete all records in a table

Status
Not open for further replies.

Ju

Technical User
Jul 4, 2000
61
FR
How can I delete all the records in a table , to keep the structure only.<br><br>Thanks a lot.
 
you can use an SQL statement to do that,<br><br>&nbsp;DELETE * FROM Table1<br><br>Hope this would help you... <p>Mohamed Aly<br><a href=mailto:samara_79@hotmail.com>samara_79@hotmail.com</a><br><a href= > </a><br>
 
It's just perfect.<br>Thank you very much.
 
For the non-coders it's also possible to just go into datasheet view and do a CTRL + A to select all records and press delete.&nbsp;&nbsp;If the table has dependent records--its primary key showing up as a foreignkey/lookup field in other tables--you'll have to select the relationship line and choose cascade delete in the relationships window first (of course the foreign key appearances will be deleted also).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top