首页 新闻 会员 周边 捐助

Sql 链表查询数据为空

0
悬赏园豆:10 [已关闭问题] 关闭于 2015-10-21 11:05
select fourm.*,cu.nick,su.nick as editnick  from Content_Book_Ask fourm (nolock)  
left join Custom_User cu (nolock) on fourm.CreateUserId = cu.ID 
left join Sys_User su (nolock) on fourm.EditUserId = su.ID  where (fourm.IsApproved = 1 and fourm.IsDeleted = 0
and cu.Status = 1 and cu.IsDeleted = 0
and su.Status = 1 and su.IsDeleted = 0)  order by fourm.displayorder desc

fourm.EditUserId = 0是暂时没有的,但是要链表查询的话,fourm.EditUserId = 0 的所有数据都查不到!怎么查呢?

西瓜凉了半个夏的主页 西瓜凉了半个夏 | 初学一级 | 园豆:7
提问于:2015-10-21 11:00
< >
分享
所有回答(1)
0

先将fourm.EditUserId = 0 的所有数据都查出来,作为一个数据表,然后再多表连接进行查询。

傲雪江南 | 园豆:174 (初学一级) | 2015-10-21 11:10
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册