SQL 语句执行后同步返回结果条数
PgSQL
SELECT COUNT(*) OVER() AS res_count FROM table WHERE ...
MySQL
mysql> SELECT SQL_CALC_FOUND_ROWS * FROM ... ; mysql> SET @rows = FOUND_ROWS();
PgSQL
SELECT COUNT(*) OVER() AS res_count FROM table WHERE ...
MySQL
mysql> SELECT SQL_CALC_FOUND_ROWS * FROM ... ; mysql> SET @rows = FOUND_ROWS();