0

I have a MS SQL database that contains multiple tables. Recently, a new table was added for another feature on the application. I found myself in an infinite loop storing all of the data in this table. I do not want to delete the data from the other tables, so how do I quickly just reset this specific table.

edit

So, if you have your Server Explorer on the left hand side of Visual Studio. (Can launch using Ctrl+Q and searching). Right Click "New Query" and type as Ben Fried said.

gabes
  • 5
  • 5

1 Answers1

0

You can simply TRUNCATE the table you want to "reset." For example:

TRUNCATE TABLE mytable

For MS SQL, more info here: https://msdn.microsoft.com/en-us/library/ms177570.aspx

For MySQL, more info here: https://dev.mysql.com/doc/refman/5.0/en/truncate-table.html

Ben Fried
  • 2,168
  • 1
  • 14
  • 13