what is SCALAR Queries?

Answers were Sorted based on User's Feedback



what is SCALAR Queries?..

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

what is SCALAR Queries?..

Answer / tannu

Irrespective of the case, scalar query is one which always
fetch same result

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

Which certification is best for sql?

0 Answers  


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.

1 Answers   Sonata,


Why is the cursor important?

0 Answers  


What is the difference between drop and truncate commands?

0 Answers  


Why is nosql good?

0 Answers  






What is foreign key sql?

0 Answers  


What is the difference between distinct and unique in sql?

0 Answers  


What is aggregate function in sql?

0 Answers  


what does it mean to have quoted_identifier on? What are the implications of having it off? : Sql dba

0 Answers  


What is a primary key called that is made up of more than one field?

0 Answers  


what is heap table? : Sql dba

0 Answers  


what are enums used for in mysql? : Sql dba

0 Answers  


Categories