shardingsphere
shardingsphere copied to clipboard
SQLSERVER Page query field return error
The sql server paging sql I use is as follows: select * from ( select TOP 30 ROW_NUMBER() OVER(ORDER BY P.BIZDATE DESC ) AS rownum, P.* FROM (select * from ( select tao.dealType, tao.orderNo, tao.SourceNo,... from TradeApi_Order tao ) f ) P ) as temp where temp.rownum > 0 ORDER BY temp.rownum
The result field of the sql query is: top(index:1), dealType(index:2) ,orderNo(index:3), SourceNo(index4)
However, the dealType index of shardingsphere record is as follows:
He seems to have skipped the index of the top field。
This causes all obtained field indexes to be reduced by 1.
version: 5.1.2