@msg_count if @@rowcount = 0 return -1000 insert into table1 (field0) values(@msg_count) return 0 go
用sql语句修改数据表中字段 实现identity(100,1)的递增
浏览:72日期:2024-02-17
create table common_info(name varchar(10),value int)insert into common_info values('msg_count', 100)你的sql应该这么写(用存储过程):create proc p_ins_alm_msg@msg_count int outasselect @msg_count = value from common_info where name = 'msg_count'update common_info set value = @msg_count+ 1 where name = 'msg_count' and value =
相关文章:
热门推荐
- 用Digester简化XML文档处理(二)
- 1.SQL中使用关系代数合并数据
- 2.10个最受欢迎的 JavaScript框架
- 3.SMTP协议-PHP的邮件发送程序例子
- 4.Solaris如何增加用户?(groupadd,useradd)
- 5.JS 逻辑判断不要只知道用 if-else 和 switch条件判断(小技巧)
- 6.Linux下安PHP,APACHE,MYSQL,PERL方法2
- 7.RFC2318 - The text/css Media Type
- 8.SQL语句怎么添加删除修改字段
- 9.配合QMAIL邮件系统:SOLARIS + HTTPD + MYSQL + PHP + LIMITIP
- 10.sql中like语句详解