How to delete all the records in SQL Server 2008?
Delete all the records
445.3k views Asked by kaveh AtThere are 10 answers
On
I can see the that the others answers shown above are right, but I'll make your life easy.
I even created an example for you. I added some rows and want delete them.
You have to right click on the table and as shown in the figure Script Table a> Delete to> New query Editor widows:

Then another window will open with a script. Delete the line of "where", because you want to delete all rows. Then click Execute.

To make sure you did it right right click over the table and click in "Select Top 1000 rows". Then you can see that the query is empty.
On
The statement is DELETE FROM YourDatabaseName.SomeTableName; if you are willing to remove all the records with reasonable permission. But you may see errors in the constraints that you defined for your Foreign Keys. So that you need to change your constraints before removing the records otherwise there is a command for MySQL (which may work for others) to ignore the constraints.
SET foreign_key_checks = 0;
Please be aware that this command will disable your foreign keys constrain check, so this can be dangerous for the relationships you created within your schema.
from a table?
You can use this if you have no foreign keys to other tables
or
if you want all tables