首页 新闻 赞助 找找看

Oracle数据库使用批处理操作

0
悬赏园豆:30 [已解决问题] 解决于 2013-04-11 12:43

在Window下操作Oracle:

打开cmd窗口之后

1.sqlplus  /nolog

2.spool c:\jinwin.log;

3.@c:\create.sql;

4.spool off;

依次输入,操作完成。

如果想使用批处理完成以上操作,请问该怎么写。

冲动的主页 冲动 | 菜鸟二级 | 园豆:394
提问于:2013-03-14 14:09
< >
分享
最佳答案
0

sqlplus -S user/pass@DBService @C:\create.sql

其中:

1、-S:设置无提示模式,可通过sqlplus -h查到;

2、把spool命令放到create脚本中,或者在外面套个脚本也可以;

3、在create脚本末尾加上个exit命令行,以退出sqlplus;

收获园豆:30
_liao | 菜鸟二级 |园豆:236 | 2013-03-25 16:54
其他回答(2)
0

windows环境不了解
linux环境:
sqlplus hr/password <<EOF
select * from employees;
commit;
quit;
EOF

码尔代夫iimax | 园豆:3138 (老鸟四级) | 2013-03-14 20:28
0

IQueryable<t> table = null;
var query = from c in table
           
where c.Date >= DateTime.Parse("2012-04-21") && c.Date < DateTime.Parse("2012-05-23")
            group c by c.Name into g
           
where g.Count() > 0
            select new { Name

zhi++ | 园豆:487 (菜鸟二级) | 2013-04-11 19:26
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册