Answer Posted / sreekumar
A scalar query returns exactly one column value from one row.
If it returns 0 rows, then the value scalar query is NULL. If returns more than one row, then Oracle returns an error.
eg.
select first_name, last_name,
(select job_title
from jobs
where employees.job_id = jobs.job_id) job_title
from employees
where rownum < 5;
Note :Use this method only as your last option in the coding..:) performance wise this is bad.
-Sreekumar
Oracle 10g DBA
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Why triggers are used?
What are commit, rollback, and savepoint?
What is error ora-01000: maximum open cursors exceeded
What is the best free sql database?
How to read/write files from pl/sql?
What is the importance of sqlcode and sqlerrm?
Show how functions and procedures are called in a pl/sql block.
What is rtm stands for?
What mean sql?
What are the uses of sysdate and user keywords?
what is transaction? : Sql dba
Which operator is used in query for pattern matching?
Can a foreign key have a different name?
what are the advantages and disadvantages of views in a database? : Sql dba
What are the popular database management systems in the it industry?