how to delete column ..

Go down

how to delete column ..

Post by anand on Thu Mar 18, 2010 11:27 am

how to delete a column from a table...............
avatar
anand

Posts : 55
Points : 70
Join date : 2010-02-26
Age : 30

View user profile

Back to top Go down

Re: how to delete column ..

Post by Christopher on Thu Mar 18, 2010 11:45 am

Code:
ALTER TABLE <TABLENAME> DROP(<FIElDNAMES>);

This stmt ll delete the specified columns(fields).


Last edited by Christopher on Thu Mar 18, 2010 11:47 am; edited 1 time in total
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: how to delete column ..

Post by anand on Thu Mar 18, 2010 11:47 am

yeah it works ... thanks....
avatar
anand

Posts : 55
Points : 70
Join date : 2010-02-26
Age : 30

View user profile

Back to top Go down

Re: how to delete column ..

Post by Maithreyi on Thu Mar 18, 2010 12:14 pm

Code:

ALTER TABLE <TABLENAME> DROP COLUMN (<FIElDNAMES>);

Isn't this the syntax ?

Maithreyi

Posts : 76
Points : 142
Join date : 2010-03-03
Age : 30
Location : Haldia

View user profile

Back to top Go down

Re: how to delete column ..

Post by anand on Thu Mar 18, 2010 12:16 pm

both works........
avatar
anand

Posts : 55
Points : 70
Join date : 2010-02-26
Age : 30

View user profile

Back to top Go down

Re: how to delete column ..

Post by Christopher on Thu Mar 18, 2010 12:16 pm

even without 'column', it works.
avatar
Christopher
Admin

Posts : 240
Points : 429
Join date : 2010-02-26
Age : 30

View user profile http://unixcpp.forumotion.com

Back to top Go down

Re: how to delete column ..

Post by Maithreyi on Thu Mar 18, 2010 12:37 pm

okie! Yesterday it gave me a keyword missing error.thats why ?

Maithreyi

Posts : 76
Points : 142
Join date : 2010-03-03
Age : 30
Location : Haldia

View user profile

Back to top Go down

Re: how to delete column ..

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum