现在的位置: 首页 > 综合 > 正文

存储过程变量

2012年12月26日 ⁄ 综合 ⁄ 共 225字 ⁄ 字号 评论关闭

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(*) 也不行。

抱歉!评论已关闭.