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
What is left join in postgresql?
how to delete an existing column in a table? : Sql dba
What is pl sql architecture?
Why indexing is needed?
what is auto increment? : Sql dba
What is trigger types of trigger?
how to check server status with 'mysqladmin'? : Sql dba
Explain character-manipulation functions?
How many tables can you join in sql?
explain advantages of innodb over myisam. : Sql dba
Why plvtab is considered as the easiest way to access the pl/sql table?
Does truncate need commit?
What is trigger types in sql?
When is the explicit cursor used ?
Can we commit inside a trigger?