??????????????Oracle??MySql??SQLServer ????????????????????RegionRes?????????
????SQLserver??????????
SELECT DISTINCT TOP 500
rr.ID AS id
??rr.strName AS name
??rr.nType AS res_type
??rr.nRegID AS region_id
??rr.strChanName AS channel_name
??rr.nChanNum AS channel
??rr.nSortID AS sort_id
??rr.nCamType AS camera_type
??rr.nKBCtrlNo AS kb_ctrl_num
??rr.nPbType AS playback_type
??rr.nDevID AS device_id
??rr.nProt AS protocol
??rr.nStreamValue AS stream_value
??rr.nStreamType AS stream_type
??rr.nBeInspect AS is_inspect
??rr.nMultID AS mult_id
??rr.nMultVer AS mult_ver
??rr.nMultSysID AS mult_sys_id
??rr.strInterAreaCode AS index_code
??'pass' AS device_index_code
FROM(
SELECT row_number() OVER (ORDER BY oo.ID ASC) AS rownumber??
* FROM(SELECT DISTINCT * FROM RegionRes o WHERE o.nType = 0 ) AS oo
) AS rr
WHERE rownumber > 10;
????MySQL??????????
SELECT DISTINCT
rr.ID AS id
??rr.strName AS name
??rr.nType AS res_type
??rr.nRegID AS region_id
??rr.strChanName AS channel_name
??rr.nChanNum AS channel
??rr.nSortID AS sort_id
??rr.nCamType AS camera_type
??rr.nKBCtrlNo AS kb_ctrl_num
??rr.nPbType AS playback_type
??rr.nDevID AS device_id
??rr.nProt AS protocol
??rr.nStreamValue AS stream_value
??rr.nStreamType AS stream_type
??rr.nBeInspect AS is_inspect
??rr.nMultID AS mult_id
??rr.nMultVer AS mult_ver
??rr.nMultSysID AS mult_sys_id
??rr.strInterAreaCode AS index_code
??'pass' AS device_index_code
FROM RegionRes rr
WHERE rr.nType = 0 ORDER BY rr.ID ASC LIMIT 10??500