Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is bash used for?

976


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.

1240


How will you find the 99th line of a file using only tail and head command?

2484


What happens on a system call?

958


Explain about stdin, stdout and stderr?

1113


Explain about shebang?

997


How do I read a .sh file?

1041


How can we find the process name from its process id?

1139


What language is bash written in?

959


What is a shell made of?

910


Print the 10th line without using tail and head command.

2130


Why is shell scripting important?

989


Explain how you Automate your application using Shell scripting.

2261


What is the best shell scripting language?

964


What is meant by $1 in shell script?

918