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
 Delete Statement

Author  Topic 

hellohello
Starting Member

12 Posts

Posted - 2011-06-08 : 10:09:50
Hi I am working in Sybase. I need to Delete all the rows in a table. I dont want to delete the table though. Any ideas of the syntax?

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2011-06-08 : 10:11:19
You do realize this is a Microsoft SQL Server Forum right?

Fingers crossed for you though

Corey

I Has Returned!!
Go to Top of Page

robvolk
Most Valuable Yak

15732 Posts

Posted - 2011-06-08 : 10:12:10
DELETE FROM myTable

or

TRUNCATE TABLE myTable

SQLTeam is a Microsoft SQL Server website. The above commands should also work in Sybase, but if they don't, try the Sybase forum over at http://dbforums.com/
Go to Top of Page

hellohello
Starting Member

12 Posts

Posted - 2011-06-08 : 10:12:41
i no but it should be the same right. the query is all in sql
Go to Top of Page

hellohello
Starting Member

12 Posts

Posted - 2011-06-08 : 10:13:37
will the table still exist rob? this just deletes the rows inside it...
Go to Top of Page

Seventhnight
Master Smack Fu Yak Hacker

2878 Posts

Posted - 2011-06-08 : 10:17:20
Neither of those should delete the table itself...

Corey

I Has Returned!!
Go to Top of Page

hellohello
Starting Member

12 Posts

Posted - 2011-06-08 : 10:27:05
perfect got it working thanks
Go to Top of Page
   

- Advertisement -