在我的MySQL模式中,我有category(id,parentid,name)表 在MSSQL中,我进行了CTE查询(从下至上为提供的类别ID构建类别树:with CTE(id,pid,name)as(select id,parentid as pid,name from category where id=197 union all select CTE.pid ...
下面看看经过CET改写过的查询:With CTE as(select-s.Id as S_ID,s.Name,s.AccountantCode,r.BusinessBackupCustomerId-,r.Id as R_ID,r.SignatureCPA1Id,r.SignatureCPA2Id from Base_Staff S left join Rpt_RegistForm R on(R....