數(shù)據(jù)庫如何設(shè)置自動編號 如何在SQL中設(shè)置自動編號?
如何在SQL中設(shè)置自動編號?現(xiàn)有數(shù)據(jù)表中不能定義自動編號,可以通過以下方法解決:例如,表的結(jié)構(gòu)如下:create table t1(userid int,username char(10))在表t1中
如何在SQL中設(shè)置自動編號?
現(xiàn)有數(shù)據(jù)表中不能定義自動編號,可以通過以下方法解決:例如,表的結(jié)構(gòu)如下:create table t1(userid int,username char(10))在表t1中有數(shù)據(jù),userid列為空。要將userid列定義為自動編號,可以采用以下方法:create table new 在創(chuàng)建以下語句后:new ID(user ID 1,而不是ID 10))T1(user name)select user name from T1。