データベース名 | 取得方法 |
---|---|
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() |
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme