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 / alpkumar
Do you mean something like this .. how do you use queries
in conjunction with shell scripts..If so, usually the
general practice which goes on is that -- write a query on
what ever database you are working with with the relevant
sql syntax.. call this query from the shell script.
For this, in our program we should start using the commands
that the database company will be providing to use in unix
environement.. So use these unix commands for connecting to
the database, calling the specific query which we had
created..,.etc ...So look out for the commands which will
be available from database provider..to use in unix/linux
flavours and accomplish your script to perform the action
automating in generating reports and mailing them (or what
ever you wanna do.. )
| Is This Answer Correct ? | 6 Yes | 9 No |
Post New Answer View All Answers
Write a command sequence to find the count of each word?
What is a boot block?
What is shell scripting?
write a shell script to generate a alert ? like when ur birthday came then generate a alert ur birthday is today like that ?
What is a beat in a script?
How to get the first line from a file using just the terminal?
What are zombie processes?
Explain about sourcing commands?
Write a script to print the first 10 elements of fibonacci series.
Write down the syntax for all the loops in shell scripting.
What does $1 mean in bash?
What is shell prompt?
What shell is bin sh?
What is awk in shell script?
What does $$ mean in shell script?