我有两个数据库,我正在使用它们之间的关系。 但有些行之间没有关系。
例如:
Select user.name as name, account.code as code
from user u
JOIN account acc ON u.account_id = acc.id
我想在代码
中检索Null而不是null值答案 0 :(得分:0)
然后你应该执行LEFT OUTER JOIN
代替INNER JOIN
Select user.name as name, account.code as code
from user u
LEFT JOIN account acc ON u.account_id = acc.id