Scripting Question: Download Questions PDF
Explain how to fetch two values from database into two variables in shell scripting?
![Scripting Interview Answer Scripting Interview Question](https://globalguideline.com/public/images/interview/14.png)
Answer:
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.
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.
Download Scripting Interview Questions And Answers
PDF
Previous Question | Next Question |
Explain how to load .so (in linux), DLL in windows in PERL? | Explain how to execute WScript & WSH object? How will i create WSH objects? |