摘要:SQLSERVER中禁用和启动约束和触发器 禁用所有外键约束 sp_msforeachtable "alter table ? nocheck CONSTRAINT all" --再启用所有外键约束 sp_msforeachtable "alter table ? check constraint all" 禁用所有trig...
阅读全文
11 2007 档案
摘要:本代码适用于: SQLSERVER2000/2005
SQL语句如下:
select c.name, t.name as type, c.length
,(case t.name
when 'nvarchar' then c.length/2
when 'nchar' then c.length/2
else c.length
end)
as reallength
from syscolumns c join systypes t
on c.xtype=t.xtype
where t.name 'sysname' and c.id=object_id('Table1')
阅读全文

浙公网安备 33010602011771号