Is it possible to do something like this?
$ sqlplus -s user/pass "select 1 from dual"
or
$ echo "select 1 from dual" | sqlplus -s user/pass
I know I can put select 1 from dual
in a file and do this:
$ sqlplus -s user/pass @myFile.sql
but I'm wondering if it's actually necessary to create a file just to satisfy sqlplus
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…