DB
Mysql 여러 줄 Insert 하기
herojoon
2023. 1. 26. 02:09
반응형
-- 단일 insert하기
INSERT INTO board (id, title, content, user, create_dt)
VALUES (NULL, 'hello1', 'happy christmas!!1', 'herojoon', NOW());
-- 여러 줄 insert하기
INSERT INTO board (id, title, content, user, create_dt)
VALUES (NULL, 'hello1', 'happy christmas!!1', 'herojoon', NOW()),
(NULL, 'hello2', 'happy christmas!!2', 'herojoon', NOW()),
(NULL, 'hello3', 'happy christmas!!3', 'herojoon', NOW());
반응형