对比SQL参数数量

  
/*查询执行SQL升级前后,存储过程的参数数量变化*/
--升级前
select a.id,b.name, count(1) as c_count   into TT99812
from syscolumns a
join (select id,name from sysobjects where OBJECTPROPERTY(id, N'IsProcedure') =1) b on a.id=b.id
group by a.id,b.name

 -- 升级后

select a.id,b.name, count(1) as c_count into TT99813 from syscolumns a
join (select id,name from sysobjects where OBJECTPROPERTY(id, N'IsProcedure') =1) b on a.id=b.id
group by a.id,b.name

-- 对比

select * from TT99812 a join TT99813 b on a.name=b.name
where a.c_count<>b.c_count



drop table TT99812

drop table TT99813

  

posted @ 2024-12-24 15:47  wsh3166Sir  阅读(1)  评论(0编辑  收藏  举报