「PostgreSQL」シーケンス(sequence)のサンプル

環境
PostgreSQL 9.6.5
Windows 10 Home 64bit

操作方法

1.シーケンスの作成

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
create sequence cft start with 1;
create sequence cft start with 1;
create sequence cft start with 1;

2.シーケンスの確認

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
select nextval('cft');
select nextval('cft');
select nextval('cft');

 

PostgreSQL

Posted by arkgame