Useful shortcuts for vi editor

Sunday 19 October 2014

How to run .sql file in sqlplus?

Press Windows button + R and press cmd then click "OK".

Write down "below command" and press enter

Full path approach
echo exit | sqlplus hr/hr @C:\sql\example.sql

Oracle path approach
echo exit | sqlplus hr/hr @?/example.sql
? -> $ORACLE_HOME

Example sql: select * from employees;

Used Oracle Version and OS: Oracle XE and Win7