1 -- 分页查询同时获取总数 2 SELECT COUNT(*) OVER() AS total_count, orders.* 3 FROM orders 4 LIMIT 10 OFFSET 10;