insert插入多条数据

--建表
create table chuyf_test_insert (
    "id" number,
    "name" varchar2(500),
    "remark" varchar2(1000),
    constraint chuyf_test_insert_pk primary key ("id")
);

--插入一条数据
INSERT INTO chuyf_test_insert VALUES (1, '1', '1');

插入多条数据:
方式一:
insert all
into chuyf_test_insert values(2, '2','3')
into chuyf_test_insert values(3, '3','3')
select * from dual;

方式二:
INSERT INTO chuyf_test_insert select 4,'4','4' from dual UNION all select 5,'5','5' from dual;



参考博客:https://blog.csdn.net/gnail_oug/article/details/80005957

posted on 2021-01-16 12:48  渐行渐远的那些人  阅读(820)  评论(0编辑  收藏  举报