开发者

Does SQL*Plus natively allow queries to run from the shell itself?

For example, is there equivalent of these in SQ开发者_如何学CL*Plus

sqlplus 'SELECT * FROM emp' | less 
sqlplus 'SELECT * FROM emp' | grep Primx

One way has been suggested by paxdiablo here. Is that the only way?


you can do it with here documents:

sqlplus  -S user/password << EOF | grep Primx
select * from emp;
EOF

-S is for silent mode, followed by username and password combination.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜