what is SCALAR Queries?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / tannu
Irrespective of the case, scalar query is one which always
fetch same result
Is This Answer Correct ? | 0 Yes | 0 No |
Which certification is best for sql?
Which one of the following is a reason that an INSERT statement might cause an error instead of executing correctly? 1. The INSERT statement was attempting to insert a record into a view that was created from more than one table. 2. The INSERT statement was attempting to insert a record using a combination of constants and values from an existing table. 3. The INSERT statement was attempting to insert a record with a non-NULL value into a table that has that column defined as NULL. 4. The INSERT statement was attempting to insert a record into a table by selecting a record from that same table. 5. The INSERT statement was attempting to insert a record into a view rather than a table.
Why is the cursor important?
What is the difference between drop and truncate commands?
Why is nosql good?
What is foreign key sql?
What is the difference between distinct and unique in sql?
What is aggregate function in sql?
what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba
What is a primary key called that is made up of more than one field?
what is heap table? : Sql dba
what are enums used for in mysql? : Sql dba