UrbanPro
true

Find the best tutors and institutes for Oracle Training

Find Best Oracle Training

Please select a Category.

Please select a Locality.

No matching category found.

No matching Locality found.

Outside India?

Search for topics

Sub Queries in SQL(Structured Query Language)

Phanindra Oruganti
15/12/2018 0 0

Writing the Query in one more Query is called Sub Query.

In Oracle SQl Sub Queries are Diveded into two categories

  • Simple Sub Queries
  • Cor-related Sub Queries

The difference between Simple Sub Queries and Cor-related Sub Queries is in case of Simple Sub Queries the outer side Query Expression can compare with inner side query only once. In the case of Cor-related Sub Queries the outward side query expression can compare with internal side query number of times based on the condition which we have specified.

Simple Sub Queries are the following categories:

  • Sub Query Comparison Test
  • Sub Query Membership Test
  • Sub Query Quantified Comparison Test
  • Existance Test

Sub Query Comparison Test: In this case, the inner side query can return only one record while comparing we can use any relational operator

Sub Query Membership Test: In this case, the inner side query can return more than one record while comparing we can use 'in' operator and the outer side query expression can compare with any one of the values which are produced by the Sub Query.

Sub Query Quantified Comparison Test: In this case, the inner side query can return more than one record, and the outer side query expression can compare with all the values which are produced by the subquery while comparing we can use operators >any, <any, >all,

Existence Test: To check the existence of record which are satisfying primary key and foreign key relationship between two columns which are existing in the same table.

 

0 Dislike
Follow 2

Please Enter a comment

Submit

Other Lessons for You

How to use joins in SQL
What are Joins in SQL? Joins in SQL are used to combine rows between two or more tables. Joins are used in SQL when user need to extract data between two or more tables based on a related column. Joins...

Sagar Waikar | 02/12/2020

0 0
0

How does a SQL Query Execute inside Oracle? What are the steps followed in the background?
The above snapshot says it all. Hence it is said, 'Picture says it all'. Basically, there are 4-5 steps. There are two possible ways of query being executed. 1. Soft Parse- Improves performance....

Gavi Y. | 05/01/2020

0 0
0

Interview questions based on "level", a pseudocolumn
1. Write a query to get the below output, 1 11 21 31 .. .. 91 2 12 22 32 .. .. 92 3 13 23 33 .. .. 93 .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 10 20 30 40 ...

Gavi Y. | 05/01/2020

0 0
0

SQL - Structured Query Language - DQL Commands - SELECT
Structured Query Language allows to store , manipulate, control and retrieve the information from Relational Database Management Systems. Following are some RDBMS products. Oracle Databse, Microsoft SQL...

Kasyap Kasyap | 29/12/2016

2 0
1

How to read and understand the Compilation errors?
Today, we will understand how to interpret the compile time erros and fix them. Don't confuse with runtime errors which is altogether a different subject called Exception Handling. Compilation erros are...

Gavi Y. | 26/12/2016

0 0
0
X

Looking for Oracle Training Classes?

Find best tutors for Oracle Training Classes by posting a requirement.

  • Post a learning requirement
  • Get customized responses
  • Compare and select the best

Looking for Oracle Training Classes?

Find best Oracle Training Classes in your locality on UrbanPro

Post your learning requirement

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more