how do you write sql queries using shell script
for eg:- we have databae table like EMPNO,ENAME,SAL,DEPTNO
columns in EMP table how you display EMPNO,SAL FIELDS from emp
in SHELL SCRIPT please explain with an example
Answer Posted / nitesh bhope
sqlplus username/userpassword@oracle<<eof
>select * from emp;
>select empno,ename,sal,deptno;
........what ever commands u wanna execute of sql u can
write here
>hit ctrl+d
these are called as here documents
| Is This Answer Correct ? | 11 Yes | 10 No |
Post New Answer View All Answers
What is scripting used for?
How do I stop script errors?
Write a command sequence to find the count of each word?
What is shell terminal?
I have 2 files and I want to print the records which are common to both.
How to debug the problems encountered in the shell script/program?
What is echo in shell?
What language is bash written in?
Explain about sourcing commands?
How do I run a script on mac?
How do I run a .sh file?
What does $0 mean in shell script?
Is shell and terminal the same?
Print the 10th line without using tail and head command.
How to find duplicate record in file using shell script?