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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Truncate

Author  Topic 

sql9.babu
Starting Member

21 Posts

Posted - 2008-02-05 : 02:39:25
can I use truncate with where clause, if so what is the syntax

thanx
sql9.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-02-05 : 02:44:28
Truncate means clear entire table. Using where does not make sense with truncate. for conditional clearing of data use
DELETE FROM Table WHERE <condition>
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-02-05 : 08:19:30
quote:
Originally posted by sql9.babu

can I use truncate with where clause, if so what is the syntax

thanx
sql9.


You cant use where clause in Truncate

Madhivanan

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

sql9.babu
Starting Member

21 Posts

Posted - 2008-02-05 : 12:07:41
thank for reply
Go to Top of Page
   

- Advertisement -