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 bash used for?
Write a shell script that adds two numbers if provided as the command line argument and if the two numbers are not entered throws an error message.
How will you find the 99th line of a file using only tail and head command?
What happens on a system call?
Explain about stdin, stdout and stderr?
Explain about shebang?
How do I read a .sh file?
How can we find the process name from its process id?
What language is bash written in?
What is a shell made of?
Print the 10th line without using tail and head command.
Why is shell scripting important?
Explain how you Automate your application using Shell scripting.
What is the best shell scripting language?
What is meant by $1 in shell script?