What do you mean by Correlated subquery?

1 Answer

Answer :

Subqueries, or nested queries, are used to bring back a set of rows to be used by the parent  query. Depending on how the subquery is written, it can be executed once for the parent query  or it can be executed once for each row returned by the parent query. If the subquery is  executed for each row of the parent, this is called a correlated subquery. A correlated subquery can be easily identified if it contains any references to the parent  subquery columns in its WHERE clause. Columns from the subquery cannot be referenced  anywhere else in the parent query. The following example demonstrates a non-correlated  subquery.
E.g. Select * From CUST Where ‘10/03/1990? IN (Select ODATE From ORDER Where  CUST.CNUM = ORDER.CNUM)

Related questions

Description : What is the Subquery ?

Last Answer : Sub query is a query whose return values are used in filtering conditions of the main query.

Description : What is correlated sub-query ?

Last Answer : Correlated sub query is a sub query which has reference to the main query.

Description : Do you know how are overpopulation and transhumanism correlated with each other?

Last Answer : I think that the more overpopulation there is, the more people feel stresses from it, leading to more dissociation and distraction from embodied awareness, and more wishful thinking for an escape. Both of ... , tends to also want to mess with genetics and breed people and other animals in factories.

Description : How can I determine if two things are statistically correlated?

Last Answer : answer:Welcome to Fluther. Your hypothesis can be easily checked by direct observation. That is, list the districts that voted for McCain, then filter out those which already had a Republican Representative. You'll have a ... orders of each and see if it's true or not. Not much of a study, I think.

Description : Are flexibility and confidence correlated?

Last Answer : answer:I am flexible and I am confident. Just ask anyone I have arrested.

Description : What characteristics have you observed to be correlated with penis size?

Last Answer : I am a tall skinny guy. My penis is the same. Data Point.

Description : Is the ability to grow a good beard directly correlated to the time between shavings?

Last Answer : No, it really depends on your hair pattern. Some people just don’t have very thick facial hair and can’t grow a good beard no matter how long they try. I saw somewhere that shaving does nothing to effect the rate or thickness of hair growth.

Description : How are music preferences correlated with characteristics of the listener?

Last Answer : answer:You might be interested in the work of Samuel Gosling and Jason Rentfrow, although they are academics, not market researchers. http://www.apa.org/monitor/julaug03/listen.html

Description : How is biological loss of forest and wildlife correlated with loss of cultural diversity? -SST 10th

Last Answer : Biological loss of forest and wildlife is strongly correlated with the loss of cultural diversity as it has increasingly marginalised and impoverished many indigenous and other forest dependent communities who ... have to walk longer to get water or fuel which is directly affecting their lifestyle.

Description : If true would suggest that the speech was correlated but not a cause of his changing poll numbers?

Last Answer : Need answer

Description : Which of the following is correlated with blood pressure? (1) Liver (2) Testis (3) Pancreas (4) Adrenal

Last Answer : (4) Adrenal Explanation: Blood pressure is an important indicator of adrenal health and function. Mild adrenal weakness is usually accompanied by normal to high blood pressure. As Adrenal Fatigue advances, low blood pressure, at rest or related to posture becomes more prevalent.

Description : The variation of thermal conductivity of a metal with temperature is often correlated using an expression of the form K = K0 + at, where, K is the thermal conductivity and T is the temperature (in °K). The units of 'a' in SI system will be (A) W/m.k (B) W/m (C) W/m.k

Last Answer : (C) W/m.k

Description : Consider the following statements: 1. Standard penetration test is commonly used for cohesionless soils. 2. Standard penetration test results in respect of a cohesionless soil are correlated to its density index and friction angle. 3. Use of H- ... 2 & 3 (b) 1 & 2 only (c) 2 & 3 only (d) 1 & 3 only

Last Answer : (a) 1, 2 & 3

Description : The correlation between intelligence test scores and grades is: a. Positive b. Negative c. Perfect d. They are not correlated

Last Answer : a. Positive

Description : Which of the following adverse effects of neuroleptic drugs is positively correlated to the antipsychotic potency of the different compounds: A. Sedation B. Extrapyramidal motor disturbances C. Postural hypotension D. Lowering of seizure threshold

Last Answer : B. Extrapyramidal motor disturbances

Description : Research confirms that participation and conflict are: (a) positively correlated. (b) counterproductive. ; (c) negatively correlated. ; (d) always present together.

Last Answer : (a) positively correlated.

Description : Q scores are generally ........ correlated with academic performance. Options: A) least B) perfectly C) highly D) moderately

Last Answer : C) highly 

Description : The importance of the correlation co-efficient lies in the fact that: (A) There is a linear relationship between the correlated variables. (B) It is one of the most valid measure of statistics. ... of the association be tween two variables. (D) It is a non-parametric method of statistical analysis.

Last Answer : (C) It allows one to determine the degree or strength of the association be tween two variables.

Description : Which of the following is correlated with blood pressure ? (1) Liver (2) Testis (3) Pancreas (4) Adrenal

Last Answer : Adrenal

Description : What does "jumps off the screen" mean?

Last Answer : answer:AMD is a relatively small manufacturer but well established in the industry. In this context, AMD jumps off the screen at the guy doing the research into acquiring companies for ... chip manufacturing division, but AMD is the one that really stands out from an acquisition perspective.

Description : What is mean by Program Global Area (PGA) ?

Last Answer : It is area in memory that is used by a Single Oracle User Process.

Description : What do you mean by a page ?

Last Answer : Pages are collection of display information, such as constant text and graphics

Description : What is mean by Program Global Area (PGA)?

Last Answer : It is area in memory that is used by a single Oracle user process.

Description : What do you mean by flat file database?

Last Answer : It is a database in which there are no programs or user access languages. It has no cross-file capabilities but is user-friendly and provides user-interface management.

Description : What do you mean by atomicity and aggregation?

Last Answer : Either all actions are carried out or none are. Users should not have to worry about the effect of incomplete transactions. DBMS ensures this by undoing the actions of incomplete transactions. ... not really exist. Such situations are called phantom deadlocks and they lead to unnecessary aborts.

Description : How to add conditions in select statement in oracle?

Last Answer : Just add the decode

Description : How can I dump an oracle schema to a LOCAL file over a network connection from sqlplus?

Last Answer : By connecting and spooling are you excluding the exp/imp commands (or expdb/impdb in 10g)?

Description : What are the two ways to incorporate images into a oracle forms application?

Last Answer : Boilerplate Images Image_items

Description : Can one export a subset of a table? (for DBA

Last Answer : From Oracle8i one can use the QUERY= export parameter to selectively unload a subset of the data from a table. Look at this example: exp scott/tiger tables=emp query=\"where deptno=10\"

Description : What are the types of visual attribute settings?

Last Answer : Custom Visual attributes Default visual attributes Named Visual attributes. Window

Description : How does one use the import/export utilities? (for DBA

Last Answer : Look for the "imp" and "exp" executables in your $ORACLE_HOME/bin directory. One can run them interactively, using command line parameters, or using parameter files. Look at the imp/exp parameters ... and export data with the "Schema Manager" GUI that ships with Oracle Enterprise Manager (OEM).

Description : what is a display item?

Last Answer : Display items are similar to text items but store only fetched or assigned values. Operators cannot navigate to a display item or edit the value it contains.

Description : What is import/export and why does one need it? (for DBA

Last Answer : The Oracle export (EXP) and import (IMP) utilities are used to perform logical database backup and recovery. They are also used to move Oracle data from one machine, database or schema to ... corruption. Ensure that all the data can be read. . Transporting tablespaces between databases . Etc.

Description : Are there any troubleshooting tips for OEM? (for DBA

Last Answer : . Create the OEM repository with a user (which will manage the OEM) and store it in a tablespace that does not share any data with other database users. It is a bad practice to create ... successfully. Check the log to see the results of the execution rather than relying on this status.

Description : Where can one get more information about TCL? (for DBA

Last Answer : One can write custom event checking routines for OEM using the TCL (Tool Command Language) language. Check the following sites for more information about TCL: . The Tcl Developer Xchange - ... the OraTCL package . Tom Poindexter's Tcl Page - Oratcl was originally written by Tom Poindexter

Description : How does one start the Oracle Intelligent Agent? (for DBA

Last Answer : One needs to start an OIA (Oracle Intelligent Agent) process on all machines that will to be managed via OEM. For OEM 9i and above:

Description : What is the Oracle Intelligent Agent? (for DBA

Last Answer : The Oracle Intelligent Agent (OIA) is an autonomous process that needs to run on a remote node in the network to make the node OEM manageable. The Oracle Intelligent Agent is ... events registered in Enterprise Manager; and . Executing tasks associated with jobs submitted to Enterprise Manager.

Description : What are the types of SQL Statement ?

Last Answer : Data Definition Language : CREATE,ALTER,DROP,TRUNCATE,REVOKE,NO AUDIT & COMMIT.

Description : How does one backout events and jobs during maintenance slots? (for DBA

Last Answer : Managemnet and data collection activity can be suspended by imposing a blackout. Look at these examples: agentctl start blackout # Blackout the entrire agent agentctl stop blackout # Resume normal monitoring ... management agentctl start blackout -s jobs -d 00:20 # Blackout jobs for 20 minutes

Description : What are the pre requisites ?

Last Answer : I. to modify data type of a column ? ii. to add a column with NOT NULL constraint ? To Modify the datatype of a column the column must be empty. to add a column with NOT NULL constrain, the table must be empty.

Description : What kind of jobs can one schedule with OEM? (for DBA

Last Answer : OEM comes with pre-defined jobs like Export, Import, run OS commands, run sql scripts, SQL*Plus commands etc. It also gives you the flexibility of scheduling custom jobs written with the TCL language.

Description : Difference between SUBSTR and INSTR ?

Last Answer : INSTR (String1,String2(n,(m)),INSTR returns the position of the mth occurrence of the string 2 instring1. The search begins from nth position of string1.SUBSTR (String1 n,m)SUBSTR returns a character string of size m in string1, starting from nth position of string1.

Description : Should the OEM Console be displayed at all times (when there are scheduled jobs)? (for DBA

Last Answer : When a job is submitted the agent will confirm the status of the job. When the status shows up as scheduled, you can close down the OEM console. The processing of the job is managed by the OIA ... that OEM will not be able to send e-mail and paging notifications when the Console is not started.

Description : Explain UNION,MINUS,UNION ALL, INTERSECT ?

Last Answer : INTERSECT returns all distinct rows selected by both queries.MINUS - returns all distinct rows selected by the first query but not by the second.UNION - returns all distinct rows selected by either queryUNION ALL - returns all rows selected by either query, including all duplicates.

Description : WHY USE RMAN ? (for DBA

Last Answer : No extra costs Its available free ?RMAN introduced in Oracle 8 it has become simpler with newer versions and easier than user managed backups ?Proper security ?You are 100% sure your ... what need to backed up Knows what is required for recovery Knows what backups are redundant

Description : WHAT IS RMAN ? (for DBA

Last Answer : Recovery Manager is a tool that: manages the process of creating backups and also manages the process of restoring and recovering from them.

Description : What is the basic structure of PL/SQL ?

Last Answer : PL/SQL uses block structure as its basic structure. Anonymous blocks or nested blocks can be used in PL/SQL.

Description : What are the two parts of a procedure ?

Last Answer : Procedure Specification and Procedure Body.

Description : What are the datatypes a available in PL/SQL ?

Last Answer : Some scalar data types such as NUMBER, VARCHAR2, DATE, CHAR, LONG, BOOLEAN. Some composite data types such as RECORD & TABLE.

Description : What are the return values of functions SQLCODE and SQLERRM ? What is Pragma EXECPTION_INIT ? Explain the usage ?

Last Answer : SQLCODE returns the latest code of the error that has occurred. SQLERRM returns the relevant error message of the SQLCODE.