0% found this document useful (0 votes)
3 views2 pages

SQL (Notes) - 2 - 2-Invert

The document explains SQL Subqueries, which are queries nested within another SQL query, involving two select statements. It provides examples, such as finding students with even roll numbers and determining maximum marks for students from specific locations. Additionally, it briefly discusses MySQL Views as virtual tables that display real-time data based on SQL statement results.

Uploaded by

23f2004531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
3 views2 pages

SQL (Notes) - 2 - 2-Invert

The document explains SQL Subqueries, which are queries nested within another SQL query, involving two select statements. It provides examples, such as finding students with even roll numbers and determining maximum marks for students from specific locations. Additionally, it briefly discusses MySQL Views as virtual tables that display real-time data based on SQL statement results.

Uploaded by

23f2004531
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 2
SQL Sub Queries ‘A Subquery or Inner query ora Nested query is @ query within another SQL query. Itinvolves 2 celect statements. oo FROM table_name WHERE col_name operator (subquery APNA SQL Sub Queries Example ci Gut nsf student who ered morta a avrg ee stop Find th vga Step dh rr ets wth ne > or SQL Sub Queries Example Find the names ofall students with even roll numbers. ‘Step 1. Find the even roll numbers ‘Step 2. Find the names of students with even roll no SQL Sub Queries I Eom Exomple with FROM Find the max marks from the students of Delhi a ‘Step 1. Find the students of Mumbai Lo ‘Step 2. Find their max marks using the sublst instep 1 MySQL Views ‘Aview isa virtual table based on the result-set of an SQL statement, Coke eeeard Poe ead Cees *Aview always shows up-to-date data. The database engine recreates the view, every ti usor queries it

You might also like