GeekInterview.com
Series: Subject:
Question: 5 of 10

How to fetch two values from database into two variables in shell scripting.

In order to get 1 value from DB and assign it to variable in shell script i use following syntax:

sqlplus /nolog << EOF | read xyz

SET LINESIZE 100
SET PAGESIZE 50
SELECT emp_sal
FROM emp
where emp_id=789;
EOF

hence, xyz variable gets emplyoee salary.

No my question is, I want to fetch emp_sal and emp_adrs and store it in two variables (xyz and abc).

How do I do that?
Asked by: Interview Candidate | Asked on: Oct 3rd, 2007

This Question is not yet answered!

Related Open Questions

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.