数据库如何设置自动编号 如何在SQL中设置自动编号?
如何在SQL中设置自动编号?现有数据表中不能定义自动编号,可以通过以下方法解决:例如,表的结构如下:create table t1(userid int,username char(10))在表t1中
如何在SQL中设置自动编号?
现有数据表中不能定义自动编号,可以通过以下方法解决:例如,表的结构如下:create table t1(userid int,username char(10))在表t1中有数据,userid列为空。要将userid列定义为自动编号,可以采用以下方法:create table new 在创建以下语句后:new ID(user ID 1,而不是ID 10))T1(user name)select user name from T1。