MSSQL 2000, if it matters.
Which query would be more "efficient"
SELECT plate,MAX([date]) from A where plate='ABC'
or
SELECT top 1 plate, [date] from A where plate='ABC' order by [date] desc
I'd assume the first would be but im not very knowledgeable on the subject, thanks.
edit: doh I just realized they return two different results. uhh..i added the where clauses
Which query would be more "efficient"
SELECT plate,MAX([date]) from A where plate='ABC'
or
SELECT top 1 plate, [date] from A where plate='ABC' order by [date] desc
I'd assume the first would be but im not very knowledgeable on the subject, thanks.
edit: doh I just realized they return two different results. uhh..i added the where clauses
