select * from tempdb..TempTable2012040609301854
declare @autoid as integer
select @autoid =autoid from tempdb..TempTable2012040609301854 order by iyperiod,corder
print @autoid
select * from tempdb..TempTable2012040609301854 where autoid = @autoid
或者:
select top 1 * from tempdb..TempTable2012040609301854 order by iyperiod desc,corder desc