SELECT subcommand (STAR JOIN command)
The SELECT subcommand specifies
the fields to be included from all data sources specified on the FROM and JOIN subcommands, with the exception of the key fields specified on the JOIN subcommand.
- The
SELECTsubcommand is required and must be the first subcommand. - All field specifications take the general form of alias.fieldname, where alias is a stand-in name for each data source specified
on the
FROMandJOINsubcommands. - Field specifications must be separated by commas.
- An asterisk (*) can be used to specify all fields
in all the data sources.
Note: In SQL the asterisk convention will cause duplicate entries for key fields in the merged result. For
STAR JOIN, asterisk means “everything that isn’t a key”. - Only one
SELECTsubcommand is allowed. - Any fields specified as keys on the
JOINsubcommand(s) that are also specified on theSELECTsubcommand are ignored on theSELECTsubcommand. - Duplicate field names in different data sources are made unique by including the table alias and a period as a prefix (for example, t1.field1, t2.field1).
- Duplicate field names specified for the same data source are ignored.