Replies: 2 comments
-
Serial 타입 INSERT
INSERT INTO fruits(name)
VALUES('Apple'); INSERT INTO fruits(id, name)
VALUES(DEFAULT, 'Apple'); |
Beta Was this translation helpful? Give feedback.
0 replies
-
이미 정의된 테이블에 시퀀스 적용하기CREATE SEQUENCE <sequence name>;
ALTER TABLE <table name> ALTER COLUMN <column name> SET DEFAULT nextval('<sequence name>');
ALTER SEQUENCE <sequence name> OWNED BY <table name>.<column name>; |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
PostgreSQL Serial Type
PostgreSQL에서는 auto increment가 지원이 되는 Sequence 타입을 지원
Beta Was this translation helpful? Give feedback.
All reactions