Home >Database >Mysql Tutorial >Oracle批处理大量SQL语句

Oracle批处理大量SQL语句

WBOY
WBOYOriginal
2016-06-07 17:17:061006browse

Oracle批处理大量SQL语句,有时需要插入很多SQL语句数据,但通过PL/SQL工具时常常要假死很长一段时间,最近用的比较频繁,稍微整

有时需要插入很多SQL语句数据,但通过PL/SQL工具时常常要假死很长一段时间,最近用的比较频繁,,稍微整理下,方便以后查阅

代码很简单:

批处理:

sqlplus  USER/PASSWORD@TESTDB @E:/1.sql 
PAUSE 按任意键继续...... 
exit 

e盘下1.sql语句内容:

insert into users(...) values (...); 
insert into users(...) values (...); 
insert into users(...) values (...); 
commit; 
quit; 

只要在.sql文件的最后加下commit;quit;两个命令提交数据,退出连接就可以了!这样方便以后通过sql语句插入数据等。

linux

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:MongoDB 基本安装配置Next article:Oracle savepoint介绍