How can I get first record of a table and last record of a table in one result-set?
This Query fails
SELECT TOP 1 Id,Name FROM Locations ORDER BY Id
select * from ( SELECT TOP 1 Id,Name FROM Locations ORDER BY Id) X UNION ALL SELECT TOP 1 Id,Name FROM Locations ORDER BY Id DESC