当前位置: 首页> 健康> 养生 > 微信管理平台_seo全称_seo网站制作优化_小学生班级优化大师

微信管理平台_seo全称_seo网站制作优化_小学生班级优化大师

时间:2025/7/11 11:07:01来源:https://blog.csdn.net/yueludanfeng/article/details/147366016 浏览次数:0次
微信管理平台_seo全称_seo网站制作优化_小学生班级优化大师

文章目录

  • PG SQL
  • DM SQL
  • 总结

PG SQL

with recursive result
as 
(select res_id,phy_res_code,res_name from tbl_res where parent_res_id =  (select res_id from tbl_res where phy_res_code = 'org@96000#20211203155858') and res_type_id = 1 union all select t1.res_id, t1.phy_res_code, t1.res_name from tbl_res t1, result where t1.parent_res_id=result.res_id and res_type_id = 1
)
select res_id,phy_res_code,res_name 
from result 
where res_id <> (select res_id from tbl_res where phy_res_code = 'org@96000#20211203155858');

DM SQL

with result(res_id, phy_res_code, res_name)
as 
(select res_id,phy_res_code,res_name from tbl_res where parent_res_id =  (select res_id from tbl_res where phy_res_code = 'org@96000#20211203155858') and res_type_id = 1 union all select t1.res_id, t1.phy_res_code, t1.res_name from tbl_res t1, result where t1.parent_res_id=result.res_id and res_type_id = 1
)
select res_id,phy_res_code,res_name 
from result 
where res_id <> (select res_id from tbl_res where phy_res_code = 'org@96000#20211203155858');

总结

  • 将 recursive 关键字删除了
  • 临时表 result 后面必须补充上表的字段列表 (column1 , column2, xxx)
关键字:微信管理平台_seo全称_seo网站制作优化_小学生班级优化大师

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

责任编辑: