存储过程变量

create PROCEDURE job_resume_Level
@id int,      --编号 AS
BEGIN

在存储过程中 if exists(select count(1) from a where id=@id)

if exists(select count(1) from b where id=@id)

如果用count(1)第二个判断的@ID是自动加1不知道为什么,个人想的是当select from 中是没有字段的时候把id当成变量加1了。

最后换成了* Cunt(*) 也不行。

posted on 2011-04-01 11:21  freexiaoyu  阅读(193)  评论(0编辑  收藏  举报