/****** Object: StoredProcedure [dbo].[GET_TableScript_MSSQL] Script Date: 06/15/2012 11:59:00 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*============================================================== 名称: GET_TableScript_MSSQL 功能: 获取c…
已经很久没用使用这个脚本了,今天用到,并做修改,增加了生成扩展属性功能. Go if object_ID('[up_CreateTable]') is not null Drop Procedure [up_CreateTable] Go /* 生成建表脚本(V4.0) Andy 2017-3-28 */ Create Proc up_CreateTable ( @objectList nvarchar(max)=null ) as --With ENCRYPTION /* 参数说明: @obj…
如果由于外键约束删除table失败,则先删除所有约束: --/第1步**********删除所有表的外键约束*************************/ DECLARE c1 cursor for select 'alter table ['+ object_name(parent_obj) + '] drop constraint ['+name+']; ' from sysobjects where xtype = 'F' open c1 ) fetch next from c1 i…
use edudbgoif exists(select * from sysobjects where name='department')drop table departmentcreate table department( id int identity(1,1) primary key, name varchar(20) not null, user_id int not null, user_name varchar(20) null, note text null, s…
/****** Object: StoredProcedure [dbo].[GET_TableScript_MYSQL] Script Date: 06/15/2012 13:05:14 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*============================================================== 名称: GET_TableScript_MYSQL 功能: 生成单…
/****** Object: StoredProcedure [dbo].[GET_TableScript_ORACLE] Script Date: 06/15/2012 13:07:16 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO /*============================================================== 名称: GET_TableScript_ORACLE 功能: 生…