SQL Subqueries Counterparts in Tutorial D
Short Description
best way of doing it in Tutorial D even if it is the best way in SQL, as we shall see. … Unlike SQL, Tutorial D has aggregate operators (Lecture 5, …
Website: www.dcs.warwick.ac.uk | Filesize: 17kb
Content
1/3
SQL Subqueries: Counterparts in Tutorial D
Hugh Darwen
I present some notes in response to a question on how to transcribe SQL queries that
use subqueries into Tutorial D. But first let me explain why I don’t teach this in
CS252. The explanation is quite simply that subqueries are not needed for relational
completeness! Put another way, for every SQL query that uses a subquery in its
WHERE clause there is an equivalent query that does not use any subqueries.
Subqueries do sometimes allow for a more convenient or more intuitive way of
expressing something but I am not too concerned with such psychological issues in
teaching relational theory. It is more important for you to understand how every
query can be expressed using just the relational operators and invocations of WHERE
that do not include relational expressions on the right-hand side.
So you don’t need to study these notes if you don’t want to. But in case you do .
What is a subquery?
SQL uses the term subquery to refer to a table expression (commonly known as a
query) that is contained within another table expression. Until 1992, as far as the
international standard…
Get the file Download here
Related Books:Related Searches:
Comments
Leave a Reply