MSSQl,中,在建表时可以指定一个列为identity 属性,
如create table MyTable(MyID int identity(1,1) not null,
..........................................)
上面例子中可以实现MyID 列以1开始,每次递增1。
种子,增量可以自己调整。identity 属性的数据类型有 TinyInt,SmallInt,Int,BigInt,decimal,numeric
增量可为负值,
看数据库类型吧。
1、acc数据库默认是自动增长
2、mssql sql都是一样的,不过有sql语句设置的
select top 11 * from Student where id not in (select top 30 id from Student order by id) order by id