2016-05-09 117 views
-2

我有表studentinfo with columns admissionNo and studentId。現在我需要生成序列號爲的studentID怎麼樣?如何在mysql中自動編號?

+0

u可以使用AUTO_INCREMENT – yusronnube

+1

如果你用Google搜索你的問題的標題,顯示了相當多的答案是第一個結果。 –

回答

1

ü可以試試這個:

 
create table studentinfo (studentId int auto_increment primary key,admissionNo varchar (25));