query doc

This commit is contained in:
jackfoxy 2023-02-09 08:17:32 -08:00
parent b7e1ba46ef
commit b92737a2eb

View File

@ -5,7 +5,7 @@
[WITH (<query>) AS <alias> [ ,...n ] ]
[ { ]
FROM [ <ship-qualifer> ]<table-view> [ [AS] <alias> ]
[ { { JOIN | LEFT JOIN | RIGHT JOIN | OUTER JOIN [ALL] }
[ { { JOIN | LEFT JOIN | RIGHT JOIN | OUTER JOIN }
[ <ship-qualifer> ]<table-view> [ [AS] <alias> ]
ON <predicate>
} [ ...n ]
@ -41,8 +41,6 @@ SELECT [ TOP <n> ] [ BOTTOM <n> ] [ DISTINCT ]
```
Cross database joins are allowed, but not cross ship joins.
`OUTER JOIN [ALL]` TO DO: remember and document what this was about
`SELECT ... INTO` targets an existing table not otherwise in the query, and completes the command.
Do not use `ORDER BY` in Common Table Experessions (CTE, WITH clause) or in any query manipulated by set operators prior to the last of the queries, except when `TOP` or `BOTTOM` is specified.