幾條常見的數據庫建表id增長sql語句


本人記性不好,老忘記id增長sql語句,所以特意記錄一下

sqlServer : create table tb(id int identity(1,1),constraint pkid primary key (id),name nvarchar(255))

mysql:create table student(id INT primary key NOT NULL AUTO_INCREMENT,name nvarchar(255));

sqlite:create table t_person (personid integer primary key autoincrement not null,name varchar(20),phone varchar(12) null )


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM