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 2000 Forums
 Transact-SQL (2000)
 How to delte a column

Author  Topic 

mrsaif
Starting Member

43 Posts

Posted - 2006-09-07 : 04:42:23
i have a table with column name roleIdFk i want to delete that column from the database altogather how can a do that?

Muhammad Saifullah

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-07 : 04:49:51
[code]Alter table tbl
drop column roleIDFK
[/code]

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-07 : 04:50:13
ALTER TABLE YourTableNameHere DROP COLUMN roleIdFk


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-07 : 04:50:32
ouch!



Peter Larsson
Helsingborg, Sweden
Go to Top of Page

mrsaif
Starting Member

43 Posts

Posted - 2006-09-07 : 05:00:31
Thanks i got it.

Muhammad Saifullah
Go to Top of Page

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2006-09-07 : 05:07:04
quote:
Originally posted by Peso

ouch!



Peter Larsson
Helsingborg, Sweden



At last !!

Finally, I got the first chance to reply than Peter by 22 ms.
Now that's what I call luck

Harsh Athalye
India.
"Nothing is Impossible"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-09-07 : 05:14:17
Not only 22 ms, it's a whopping 22 seconds!


Peter Larsson
Helsingborg, Sweden
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-09-07 : 12:06:06
quote:
Originally posted by mrsaif

i have a table with column name roleIdFk i want to delete that column from the database altogather how can a do that?

Muhammad Saifullah


Make sure that other tables dont depend on that column

Madhivanan

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

- Advertisement -