We all know to run sql scripts (.sql files) from command prompt but sometimes we need to run a sql query from command prompt. It is sometimes necessary when we have to fetch a query result from a script (shell/perl) and process it. By following way, we can run a sql query from command prompt.
echo "select * from dual;" | sqlplus -S user/pwd\@sid
Monday, July 20, 2009
Run sql query from command line
Posted by Vishnu Agrawal at 8:16 PM
Labels: perl script, sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment