PostgreSQL Having子句

在PostgreSQL中,HAVING子句与GROUP BY子句组合使用,用于选择函数结果满足某些条件的特定行。

语法:

SELECT column1, column2  
FROM table1, table2  
WHERE [ conditions ]  
GROUP BY column1, column2  
HAVING [ conditions ]  
ORDER BY column1, column2

Copyright © 2015-2026