I have two tables: Master and Detail.
They are joined on a column called master_id
The detail table has an identity column called Id.
I need to write a query that returns all the columns in the master table, plus the columns for the Detail table for the row that has the highest value of Id. (i.e. the latest row).
Can anyone suggest a general syntax?
To summerize: A master row plus the detail row that has the highest value of id for any given value of master_id.