2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

PostgreSQL 複数行を一括でinsert

Posted at

複数行一括INSERT

INSERT INTO public.a (b, c) VALUES 
 ('R100001', 'リンゴ'),
 ('R100002', 'バナナ'),
 ('R100003', 'ネコ'),
 ('R100004', 'イヌ');

結果確認

 postgres=# select * from public.a;
    b    |   c
---------+--------
 R100001 | リンゴ
 R100002 | バナナ
 R100003 | ネコ
 R100004 | イヌ
(4 rows)

参考

MyBatis+Spring Bootで、複数行のinsert(Multi Row Insert)とバッチ更新(Batch Insert)を試す
MyBatisでまとめてinsertする方法
JDBC と MyBatis でバルク・インサート(multi-row vs batch)

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?