TRIGGER

ALTER TRIGGER [dbo].[trigCateDelete]
   ON  [dbo].[category]
   instead of DELETE
AS
BEGIN
    declare @caId int
    select @caId=(select id from deleted)
    delete comment where newsId in (select newsId from news where caId=@caId)
    delete news where caId=@caId
    delete category where id=@caId

END

 

 

ALTER procedure [dbo].[pc_login]
    @name varchar(30),
    @pwd varchar(30)
as
select count(*) from tb_user where userName=@name and password=@pwd
posted @ 2012-06-03 23:12  hishanghai  阅读(79)  评论(0编辑  收藏  举报