时间:2021-07-01 10:21:17 帮助过:6人阅读
(select A,B,C,D from t1) union (select '100' as A ,B,C,D from t2) union (select A,B,C,D from t3)
$sql = '你的sql查询指令';$sqls 就是最终执行的查询语句
$start = 1; //起始偏移
$pagesize = 20; //每页行数
$sqls =<<< SQL
SELECT * FROM
(
SELECT A.*, ROWNUM RN
FROM ($sql) A
WHERE ROWNUM < $start+$pagesize
)
WHERE RN >= $start
SQL;