在MySQl中使用Increment by

时间:2012-08-05 04:40:10

标签: mysql database

我希望我的表将某个列的起始值增加1000并增加50。 我怎么能在MySQL中做到这一点?

2 个答案:

答案 0 :(得分:3)

请 - 在询问之前使用搜索。这是一个问题,答案可以帮助您:

How is the MySQL auto_increment step size determined

答案 1 :(得分:0)

select (@id:=@id+50) as sno from yourtable,(select @id=1000) sno