Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: SQL statements in command line
You have to have your last command exit;
Example:
sqlplus -s user/pass @file.sql
OR
#!/bin/sh
sqlplus -s user/pass <<TEXT_END
select user from dual;
exit;
TEXT_END
David.
Oliver Schoenwaelder (schoeni_at_okay.net) wrote:
: Hi,
:
: is there any chance to execute sql statements or pl/sql programs from
: the command line on a linux machine? If I pass the sql statement as file
: to sqlplus it is executed but sqlplus doesn't return to the prompt. Are
: there any additional programs / third party products which provide this?
:
: Thanks a lot,
:
: Oliver Schoenwaelder
: Infogrames Deutschland GmbH
:
:
--
--
David Zlotchenko
E-mail: zlotchen_at_cs.utk.edu
WWW: http://www.oars.utk.edu/~zlotchen
Received on Wed Dec 01 1999 - 10:15:50 CST
![]() |
![]() |