无标题1.sql
来自「这是一个C#写的QQ聊天工具,大家可以看看怎么样,发表一个意见」· SQL 代码 · 共 28 行
SQL
28 行
use sq
go
--增加注册
create procedure Registration @uid int output, @name varchar(16),@password varchar(16),@picture int
as
insert into [user](name,password,picture) values (@name,@password,@picture)
select @uid = @@identity
go
declare @uid int
exec Registration @uid output,'Zhangsan','123456',1
print @uid
go
--触发器
create trigger userUpdate
on user
for Update
as
if Update(BirthDate)
begin
if(select DATEDIFF(year, BirthDate, getdate())from inserted)<18
BEGIN
RAISERROR('。。。。小子....',16,1)
ROLLBACK
END
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?