Djabarov, Robert
Robert.Djabarov at usaa.com
Wed Feb 26 14:50:30 CST 2003
alter table <tbl_name> drop constraint <default_name> sp_unbindefault is used on defaults created with CREATE DEFAULT and then sp_bindefault. ______________________________________________________ Robert Djabarov Certified MS SQL Server DBA Certified MS SQL Server Programmer Certified MS VB Programmer ? (210) 913-3148 - phone ( (210) 753-3148 - pager -----Original Message----- From: Stoker, Kenneth E [mailto:Kenneth.Stoker at pnl.gov] Sent: Wednesday, February 26, 2003 2:18 PM To: dba-SQLServer (E-mail) Subject: [dba-SQLServer]Removing a Default on a column Everyone, I am trying to remove a default on a column through T-SQL. I tried to used sp_unbindefault and get an error 'cannot unbind from <column name>. use alter table drop constraint.' So, I take this to heart and try an 'alter table drop constraint'. I then get an error back saying there is not constraint with that name. I can see the default in the sysobjects table and I see its id in the cdefault column for the field within the syscolumns table. Is there some other way I should be doing this? Thank you. Ken Stoker Technology Commercialization Information Systems Administrator PH: (509) 375-3758 FAX: (509) 375-6731 E-mail: Kenneth.Stoker at pnl.gov _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com