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

Author  Topic 

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-01-18 : 22:47:07
I am trying to delete a record from a table in SQL 2005 Express. It is not working though, I am trying this:


delete *
from tblBilling where bID = '206'

Jai Krishna
Constraint Violating Yak Guru

333 Posts

Posted - 2009-01-18 : 22:48:10
Try this i think bid is an int field

delete *
from tblBilling where bID = 206

Jai Krishna
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 22:48:47
you dont require * in delete. it should be

delete from tblBilling where bID = '206'


also you should be refering to books online for syntax related problems in first instance
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 22:49:31
quote:
Originally posted by Jai Krishna

Try this i think bid is an int field

delete *
from tblBilling where bID = 206

Jai Krishna


Jai please test this before posting. delete * not works. you dont require column info in delete
Go to Top of Page

jcb267
Constraint Violating Yak Guru

291 Posts

Posted - 2009-01-18 : 22:50:32
Thanks, that worked.....

quote:
Originally posted by visakh16

you dont require * in delete. it should be

delete from tblBilling where bID = '206'


also you should be refering to books online for syntax related problems in first instance

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-01-18 : 22:52:06
welcome
Go to Top of Page
   

- Advertisement -