随笔分类 - SQL SERVER
Sql Server 添加新字段(可重复执行--范本)
摘要:--添加"紧急状态"字段 use [GUOYOUZI.Study] go IF(NOT EXISTS(SELECT 1 FROM sys.tables t JOIN sys.columns c ON c.object_id = t.object_id WHERE t.name='BasicInfo'
阅读全文
Sql Server 创建表(可重复执行--范本)
摘要:use [GUOYOUZI.Study] if exists (select 1 from sys.sysreferences r join sys.sysobjects o on (o.id = r.constid and o.type = 'F') where r.fkeyid = object
阅读全文
Sql Server 存储过程(可重复执行--范本)
摘要:/**变更申请同意--存储过程**/ USE [GUOYOUZI.Study] IF EXISTS (SELECT name FROM sysobjects WHERE name = 'Proc_ChangeApply_Agree' AND type = 'P') DROP PROCEDURE Pr
阅读全文
浙公网安备 33010602011771号