当前位置: 代码迷 >> SQL >> SQL话语左连接带子查询
  详细解决方案

SQL话语左连接带子查询

热度:18   发布时间:2016-05-05 13:49:18.0
SQL语句左连接带子查询

CREATE OR REPLACE VIEW FEEDBACK_VIEW AS
SELECT w.*,f1.SUBJECT ReplySubject,f1.CONTENT ReplyContent,f1.NAME ReplyName,f1.EMAIL ReplyEmail,f1.COMPANY ReplyCompany,f1.CREATETIME ReplyTime
??? FROM (SELECT f.*,t.Name TypeName FROM FEEDBACK f LEFT JOIN FEEDBACK_TYPE t ON f.type=t.ID) w
??? LEFT JOIN FEEDBACK f1
??? ON w.ID=f1.REPLYID;

  相关解决方案