sql server - Replacing max(columnname) with a different query -
sql server - Replacing max(columnname) with a different query -
i working number of tables, developer used 'max(columnname)' on own recent entry in column. can cause performance bottlenecks i'm trying replace max(columnname) alternative queries.
i thought of:
select [column name], max(1) [table] order [column name]
and
select top 1 [column name] [table] order [column name] desc
do think 1 of above work well? if not, have suggestions how build improve query?
sql-server max
Comments
Post a Comment