LoginSignup
13
14

More than 5 years have passed since last update.

主要データベース 自動採番取得方法

Posted at
データベース名 取得方法
SQLServer select SCOPE_IDENTITY();
Access select LAST(id列名);
MySQL select LAST_INSERT_ID()
PostgreSQL select curval('シーケンス名')
SQLite select seq from sqlite_sequence where name='テーブル名'
Oracle select シーケンス名.curval from dual;
hsqldb call identity()
13
14
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
14