请问老师,怎么在 left join 后面使用构造器拼装条件, 不要拼装在where后面
SELECT
! ISNULL( uwl.user_id ) AS isLike,
uw.id,
uw.liked_num
FROM
user_wonderful uw
LEFT JOIN user_wonderful_liked uwl ON uw.id = uwl.uw_id
AND uwl.user_id = 1
请问老师这个AND uwl.user_id = 1使用什么方法在代码中拼装?
SELECT
! ISNULL( uwl.user_id ) AS isLike,
uw.id,
uw.liked_num
FROM
user_wonderful uw
LEFT JOIN user_wonderful_liked uwl ON uw.id = uwl.uw_id
AND uwl.user_id = 1
请问老师这个AND uwl.user_id = 1使用什么方法在代码中拼装?
2020-08-13
举报