摘要:
declare 游标名称 cursor 【local|global】【游标选项】 for 查询语句open 游标名称fetch [next] from 游标名称 into @v1,@v2.... 判断 @@fetch_status状态,继续fetchclose 游标名称--1.定义游标declare... 阅读全文
摘要:
1、创建存储过程 create proc 存储过程名称@参数名称 参数类型 【output】...asbegin .......................... ..........................end2、删除 drop proc 存储过程名称3、修改 alter proc 存储过程名称 4、调用 declare @aa int ... 阅读全文
摘要:
触发器inserted表与deleted表执行insert语句,使用inserted表执行delete语句,使用deleted表执行update语句,旧数据放到deleted表,新数据放到inserted表触发器:自动化,减少手动到来误操作触发器没有执行完毕,就会一直占用表,其他链接不能使用该表output.inserted.列名1、DML触发器:insert delete update(不支持s... 阅读全文
摘要:
Using the CodeCreate a table with some dummy records to show the demonstration:Hide Copy Codecreate table tbl_test (id int identity(1,1), column1 nvarchar(50), coulmn2 nvarchar(50), coulmn3 nvarcha... 阅读全文