【发布时间】:2017-01-05 13:04:12
【问题描述】:
我想将上面提到的 oracle 查询转换为 PostgreSQL 以获取表的计数
select count(*) from student connect by prior std_id=std_roll
【问题讨论】:
-
您的 Oracle 查询没有意义。
connect by没有start with似乎是错误的。 withstart with基本上与select count(*) from student相同 -
stackoverflow.com/q/41302331/2235885 由同一作者完全相同。
标签: sql postgresql hierarchical-data hierarchical-query