存储过程 触发器

      数据库学习笔记 2006-2-12 15:42

Create ProC [EDURE] procedure_Name
[
{(@param data_Type)} [=default] [output]
]
[...n]
[
with
[With
{
recompile | ENCRYPTION | RECOMPIL,ENCRYPTIOn
}
]
]
as sql_Statement [...n]


if Exists(select name from sysobjects where name ='title_Sum' and type='P'


crate Trigger trigger_name
on table with encryption
for {[delete,insert,update]} not for replication
as sql_statement []
[return integer_Expression]


use northwind
go

create trigger tr_product_update on products
for update
as
Declare @msg varchar(100)
select @msg =str(@@rowcount) +" employees updated by this statement"
print @Msg

return
go
标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}