0% found this document useful (0 votes)
16 views

SELECT Column - Name(s) FROM Table - Name1 Table - Name

The document discusses different types of SQL queries including: joining two tables without aliases leading to ambiguity; using table aliases to resolve ambiguity; using WHERE conditions to filter rows; using subqueries in the FROM clause or WHERE clause; and using operators like IN, EXISTS, ALL, ANY with correlated subqueries. It also reminds the reader about the SELECT INTO statement which can be used to create a new table or insert a single row from a subquery.

Uploaded by

JitsNavin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

SELECT Column - Name(s) FROM Table - Name1 Table - Name

The document discusses different types of SQL queries including: joining two tables without aliases leading to ambiguity; using table aliases to resolve ambiguity; using WHERE conditions to filter rows; using subqueries in the FROM clause or WHERE clause; and using operators like IN, EXISTS, ALL, ANY with correlated subqueries. It also reminds the reader about the SELECT INTO statement which can be used to create a new table or insert a single row from a subquery.

Uploaded by

JitsNavin
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

SELECT column_name(s)

FROM table_name1 , table_name2

How Did we resolve ambiguities?

SELECT column_name(s)
FROM table_name1 t1, table_name2 t2

Table Variables ?

SELECT column_name(s)
FROM table_name1 , table_name2
WHERE Conditions

subqueries: nested
Select statements
SELECT column_name(s)
FROM table_name1 , table_name2, (Select )
WHERE Conditions

SELECT column_name(s)
FROM table_name1 , table_name2
WHERE Conditions (Select )

SELECT column_name(s)
FROM table_name1 , table_name2, (Select )
WHERE Conditions

SELECT column_name(s), (Select )


FROM table_name1 , table_name2
WHERE Conditions

SELECT column_name(s)
FROM table_name1 , table_name2
WHERE Conditions (Select )
Accompanying Operators:

1. IN Operator
2. Exists Operator
1. Correlated Reference
3. ALL & ANY

SELECT column_name(s)
FROM table_name1 , table_name2, (Select )
WHERE Conditions

Recall SelectInto Concept !! -> Creates Relation

SELECT column_name(s), (Select )


FROM table_name1 , table_name2
WHERE Conditions

Recall SelectInto Concept !! -> single row.

You might also like