

| 如何用sql语句修改数据表中字段,实现identity(100,1)的递增 | ★★★ | |
| 如何用sql语句修改数据表中字段,实现identity(100,1)的递增 |
作者:不详 文章来源:中国论坛网 点击数: 更新时间:2005-5-10 ![]() |
|
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 out as select @msg_count = value from common_info where name = 'msg_count' update common_info set value = @msg_count+ 1 where name = 'msg_count' and value = @msg_count |
| 文章录入:残月 责任编辑:残月 |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |