方法
if exists (select * from dbo
exec sp_droptype N
GO
setuser
GO
EXEC sp_addtypeN
GO
方法
USE master
go
EXEC sp_configure
go
RECONFIGURE WITH OVERRIDE
go
use t
go
begin transaction
delete systypes where uid=user_id(
if @@rowcount<>
commit transaction
else
rollback transaction
go
use master
go
EXEC sp_configure
go
RECONFIGURE WITH OVERRIDE
go
還忘記一點
USE master
go
EXEC sp_configure
go
RECONFIGURE WITH OVERRIDE
go
use t
go
begin transaction
UPDATE systypes SET UID=
if @@rowcount<>
commit transaction
else
rollback transaction
go
use master
go
EXEC sp_configure
go
RECONFIGURE WITH OVERRIDE
go
From:http://tw.wingwit.com/Article/os/youhua/201311/10842.html