The method shown before (Select 'delete from ' + name from Sysobjects where Type='u' order by name) returns also dtproperties table, wich you might not want to delete. If so, add 'status>0' where clause, status coming from Sysobjects table.
You can use this Query to empty table TRUNCATE TABLE "table_name" ; It can delete all data of the table..
Yeah it can be an appropriate option to perform such kind. thanks ------------------------------------- Free software download
Simply write the code trucate table Table_Name This is the query:- Truncate table is keyword for deleting all the table in particular database. and write the name of the table name which you want to be deleted in the place of table_Name
Delete data from table Ex. Ex. SQL query sql-> delete from students where students is name of table. It deletes all data from table sql-> delete from students where id=20 It deletes particular record from table.
Truncate table “table_nameâ€; Ex: Truncate table Bank_employee; If you want to deleted particular records then use this query Delete from “table_name†Where “conditionâ€; Ex: Deleted from Bank_employee where employee_name=abc and employee_id=2;
Is there an easy way to delete all data from all nonsystem tables in a given sql server 2000 database? Right now i have about 50 tables that i want to clear data out of and want to know if there is an easier way than Delete from <mytable> For each table i want to clear data out of.