单个插入查询中插入多行。 [英] Multiple rows insertion in single insert query.

查看:82
本文介绍了单个插入查询中插入多行。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

在oracle中是否可以在单个插入查询中插入多行,如sql server中所示:

插入test_table值(' 'abc'',''xyz''),(''mno'',''pqr'');


oracle中不支持此语法。 oracle是否有任何替代方案。


谢谢&提前新年快乐。

Hi All,
Is it possible in oracle to insert multiple rows in a single insert query, as is possible in sql server:
insert into test_table values (''abc'', ''xyz''), (''mno'', ''pqr'');

This syntax is not supported in oracle. Is oracle having any alternative for this one.

Thanks & happy new year in advance.

推荐答案

尝试使用PL / SQL批量插入
try to use bulk insert using PL / SQL



尝试使用批量插入使用PL / SQL
try to use bulk insert using PL / SQL



嗨debashisdas,

感谢您的回复。我知道可以通过PL / SQL完成,但在这种情况下会有多个插入查询。我想知道在oracle中是否有任何替代插件专门用于单行插入查询。


谢谢。

Hi debashisdas,
Thanks for your reply. I know that can be done by PL/SQL, but in that case there will be multiple insert queries. I was wondering if there is any alternative in oracle for Multiple rows insertion specifically with single insert query.

Thanks.


你问的语法Oracle不支持about。
The syntax you are asking about is not supported in Oracle.


这篇关于单个插入查询中插入多行。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆