2008年11月20日 星期四

如何在 Sybase 內作自動增值?

建立表格時,主鍵要設定 identity 參數

新增資料時,主鍵不用填值,例:insert into myTable (name) values ('pogi')
如此主鍵就會自動增值為1。