[Solved] What would this SQL query do?


This query creates a column called COL and puts literal value of ‘ID’ in it.

It then provides the first (or highest) ID (numeric or alphabetic depending on what type of field ID is) and places it in the same row as the literal value “ID” under the column named (MAX).

It then takes the first (or highest) NAME depending on field type also, and puts the literal value “Name” into the COL column and the first/highest name into the second column (MAX).

The UNION combines those two rows into a single result set.

1

solved What would this SQL query do?