首页 > 代码库 > 左链接查询

左链接查询

SELECT * FROM (SELECT * FROM T_Life_Message z WHERE z.message_id NOT IN(SELECT  u.message_id FROM T_Life_UMessage u WHERE u.account=‘18922234293‘ AND u.isdelete=1) AND message_status=1) AS M LEFT JOIN (SELECT u.message_id,u.isread FROM T_Life_UMessage u) AS N ON M.message_id=N.message_id 

  

左链接查询