if Exists(select * from sysobjects where NAME = 'insert_custominfo' and type='P')
drop procedure insert_custominfo
go
create proc insert_custominfo
@mid nvarchar(50),
@custominfoid nvarchar(50) output
as
begin
declare @num int
set @num =( select COUNT(*) from t_custominfo where c_id=@mid )
if(@num =0)
begin
insert into t_custominfo(c_id) values(@mid)
set @custominfoid = @@IDENTITY
end
else
begin
select @custominfoid=c_custominfoid from t_custominfo where c_id=@mid
end
end declare @custominfoid int
exec insert_custominfo '',@custominfoid output
print @custominfoid

最新文章

  1. HttpTool.java(在java tool util工具类中已存在) 暂保留
  2. RCP:gef智能寻路算法(A star)
  3. 面向对象编程(十二)——final关键字
  4. php给一张图片加上水印效果
  5. HDU 1061 N^N (n的n次方的最后一位)
  6. python常用函数年初大总结
  7. 使用ExecutorCompletionService 管理线程池处理任务的返回结果
  8. 基于mapreduce实现图的三角形计数
  9. django模型层优化(关联对象) 懒加载和预加载 +长链接
  10. 小程序获取formid配置模板消息
  11. HDU5511 : Minimum Cut-Cut
  12. LOJ121 动态图连通性(LCT)
  13. 你不知道的JavaScript(中卷) (Kyle Simpson 著)
  14. shell expect的简单用法【转】
  15. 【BZOJ】【3931】【CQOI2015】网络吞吐量
  16. Java(20~24)
  17. Word里面怎么取消全文每个标题前面都有的这个点
  18. poj 2195 Going Home(最小费最大流)
  19. GCC中文错误提示
  20. UVA 11997 K Smallest Sums 优先队列 多路合并

热门文章

  1. 【SQL Server性能优化】运用SQL Server的全文检索来提高模糊匹配的效率
  2. Sqlserver查询每组数据中最大的一条数据
  3. Java Web-Filter and listener
  4. R语言学习笔记:glue包实现变量传参
  5. [书籍翻译] 《JavaScript并发编程》第四章 使用Generators实现惰性计算
  6. [LeetCode] 219. Contains Duplicate II ☆(存在重复元素2)
  7. 【Hibernate】抓取策略
  8. golang GC(一 原理)
  9. MySQL学习笔记-MHA安装配置
  10. Microsoft 中间语言