Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 how can i delete all rows in a table at same time

Author  Topic 

rammohan
Posting Yak Master

212 Posts

Posted - 2006-10-06 : 04:23:12
hi,
here i am with a table containing 5columns and 100 rows.i want to delete all rows at the same time. pls suggest me a way on this

One can never consent to creep,when one feels an impulse to soar
RAMMOHAN

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-10-06 : 04:26:15
[code]delete tablename[/code]

if your table does not has foreign key constraint, you can use
[code]truncate table tablename[/code]


KH

Go to Top of Page

mr_mist
Grunnio

1870 Posts

Posted - 2006-10-06 : 04:57:19
Take a backup first please for when you break something.

-------
Moo. :)
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-10-06 : 09:36:48
quote:
Originally posted by mr_mist

Take a backup first please for when you break something.

-------
Moo. :)



MOO Indeed



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-10-06 : 10:01:05

rammohan, you need to Learn SQL

http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)

7020 Posts

Posted - 2006-10-06 : 11:11:50
If you have to ask that question, it's something you shouldn't be doing.



CODO ERGO SUM
Go to Top of Page
   

- Advertisement -