我有一个表中有数据
table1tid tcode tname
1 1 abc
2 2 bcd
3 3 cde
5 4 def
7 5 hij
12 6 xyz
tid是主键(递增键)
现在我要插入数据tname=‘efg’要它的tcode=‘5’
这样hij和xyz的tcode都要依次加一
应该怎么实现?谢谢
table1tid tcode tname
1 1 abc
2 2 bcd
3 3 cde
5 4 def
7 5 hij
12 6 xyz
tid是主键(递增键)
现在我要插入数据tname=‘efg’要它的tcode=‘5’
这样hij和xyz的tcode都要依次加一
应该怎么实现?谢谢
http://community.csdn.net/Expert/topic/5086/5086323.xml?temp=.678982