What is subquery in SQL?

0 votes
Hi!!

Can someone tell me what a subquery is in SQL?
Oct 12, 2018 in Database by DataKing99
• 8,130 points
230 views

1 answer to this question.

0 votes

A subquery is a query inside another query where a query is defined to retrieve data or information back from the database. In a subquery, the outer query is called as the main query whereas the inner query is called subquery. Subqueries are always executed first and the result of the subquery is passed on to the main query. It can be nested inside a SELECT, UPDATE or any other query. A subquery can also use any comparison operators such as >,< or =.

answered Oct 12, 2018 by DataKing99
• 8,130 points

Related Questions In Database

0 votes
1 answer

What is checkpoint in Database?

Checkpoint declares a point before which all ...READ MORE

answered Sep 4, 2018 in Database by darklord
• 6,170 points
185 views
0 votes
1 answer

What is the SQL query to get the third highest salary of an employee from employee_table

You can try out something like this: SELECT ...READ MORE

answered Sep 26, 2018 in Database by darklord
• 6,170 points
294 views
0 votes
1 answer

What are the different authentication modes in SQL Server? How can it be changed?

Windows mode and Mixed Mode – SQL ...READ MORE

answered Oct 29, 2018 in Database by darklord
• 6,170 points
67 views
0 votes
1 answer

What is HAVING Clause in MySQL?

Since the WHERE keyword cannot be used with aggregate ...READ MORE

answered Nov 21, 2018 in Database by darklord
• 6,170 points
44 views
0 votes
1 answer

Which query to use for better performance, join in SQL or using Dataset API?

DataFrames and SparkSQL performed almost about the ...READ MORE

answered Apr 19, 2018 in Apache Spark by kurt_cobain
• 9,260 points
119 views
0 votes
1 answer

How to connect Java program to the MySQL database?

You can connect your Java code with ...READ MORE

answered May 11, 2018 in Java by parth295
• 4,640 points
196 views
0 votes
1 answer
0 votes
1 answer

Automating Oracle script with nolio

Depending upon the details of your script ...READ MORE

answered Jul 17, 2018 in Other DevOps Questions by ajs3033
• 7,280 points
57 views
0 votes
1 answer

What are the manipulation functions in SQL?

There are three case manipulation functions in ...READ MORE

answered Oct 11, 2018 in Database by DataKing99
• 8,130 points
594 views
0 votes
1 answer

What is a Join in terms of database?

JOINS are used to combine rows from ...READ MORE

answered Nov 13, 2018 in Database by DataKing99
• 8,130 points
51 views