得到記錄的行號,不考慮重復記錄select ROW_NUMBER() OVER(order by Name) as RowIndex,* from SysObjects得到記錄的序號select RANK() OVER(order by Name) as RowIndex,* from SysObjects