摘要:
--树形sql查询 WITH TREE AS( --创建一个虚拟表 SELECT * FROM tableName --指定需要查询的表 WHERE id = '' -- 指定父节点条件 UNION ALL --联合查询 SELECT tableName.* FROM tableName,TREE 阅读全文
摘要:
一、根据表单类型查询其所有的上级表单类型: 1、每次按照一个子节点的值进行查询: with partents as ( select * from JCBDFL where BDFLDM ='14' UNION ALL (SELECT a.* from JCBDFL as a inner join 阅读全文