Skip to content

SQL distinction between tables and collection-valued columns #91

Answered by julianhyde
DavidPratten asked this question in Q&A
Discussion options

You must be logged in to vote

In SQL, table and column expressions are in different namespaces. Expressions in the FROM clause see table expressions (e.g. catalog.schema.table) whereas expressions in the SELECT clause see column expressions (e.g. tableAlias.column.nestedColumn).

This means that there are essentially two languages in SQL (three if you note that the resolution rules are different in an aggregate query). The type system is not unified (e.g. a table does not have a datatype of 'multiset of record' or 'array of record', in fact it doesn't really have a datatype). There are operators and conventions to map between the two languages, for example:

  • When I write 'FROM emps' in the table-language this implicitl…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by DavidPratten
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants