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
 Deleting a user defined data type

Author  Topic 

sital
Yak Posting Veteran

89 Posts

Posted - 2008-12-24 : 10:37:09
When I Execute the statement to delete a user defined its giving me the error.

The Query I used is:

create default zip1_default as 94710
go

create type zip1
from char(5) not null
go

sp_bindefault 'zip1_default','Zip1'

drop default zip1

sp_unbindefault 'zip1_default','zip1'

drop type zip1

The last statement drop type zip1 when executed generates the following error:

Msg 218, Level 16, State 1, Line 1
Could not find the type 'zip1'. Either it does not exist or you do not have the necessary permission.

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-25 : 01:48:52
try giving a go between drop default and unbindefault statements
Go to Top of Page

suresha_b
Yak Posting Veteran

82 Posts

Posted - 2008-12-26 : 01:48:42
create default zip1_default as 94710
go

create type zip1
from char(5) not null
go

sp_bindefault 'zip1_default','Zip1'
go

sp_unbindefault 'zip1'
go

drop default zip1_default
go

drop type zip1
go
Go to Top of Page
   

- Advertisement -