随笔分类 - MSSQL
摘要:Create table LogInfo ( Id uniqueidentifier unique, content text null, Inputdate datetime not null, ) alter table LogInfo add constraint constraint_Id
阅读全文
摘要:if(exists (select 1 from sys.objects where name='proc_out')) --用于判断改存储过程是否存在 drop proc proc_out GO CREATE PROC proc_out @id1 int out, --out 可以传进,可以传出
阅读全文
摘要:MD5 :hashbytes('md5','*******') varbinary转varchar CONVERT(varchar(max),'********',2) pwdencrypt('*******') 比较 PWDCOMPARE('*********',pwdencrypt('*****
阅读全文
摘要:1、修改字段名: alter table 表名 rename column A to B 2、修改字段类型: alter table 表名 alter column 字段名 type not null 3、修改字段默认值 alter table 表名 add default (0) for 字段名
阅读全文
摘要:select ',' + ta.value from ta for xml path; select ','+ value from ta for xml path(''); select * from ta for xml path('row'); select * from ta for xml path('');
阅读全文
摘要:SQL Server中,如果目标表存在: SQL Server中,,如果目标表不存在:
阅读全文
摘要:DBCC CHECKIDENT(Vol_Students,RESEED,0)
阅读全文

浙公网安备 33010602011771号