为什么 这个语句会出错?

da18a 2005-01-09 04:23:06
select top 1 *,(select count(*) from mf_post where (threadid = Aa.threadid)) as threadpostcount from mf_thread Aa inner join mf_user Bb on Aa.userid = Bb.userid where (forumid = 1) and (threadid not in (select top 0 threadid form mf_thread where (forumid = 1))) order by threadid desc
...全文
56 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
da18a 2005-01-09
  • 打赏
  • 举报
回复
form mf_thread
----->
from mf_thread

晕哦
chinaandys 2005-01-09
  • 打赏
  • 举报
回复
//....(forumid = 1) and (AS.threadid not in (select threadid form mf_thread where (forumid = 1)))

fornumid、threadid 列是 Aa表还是Bb
(Aa.fornumid=1)and (Aa.threadid<>1)
order by Aa.threadid desc

skyboy0720 2005-01-09
  • 打赏
  • 举报
回复
form mf_thread
----->
from mf_thread
skyboy0720 2005-01-09
  • 打赏
  • 举报
回复
select top 1 *,
(select count(*) from mf_post where (threadid = Aa.threadid))
as threadpostcount from mf_thread Aa inner join mf_user Bb
on Aa.userid = Bb.userid where (forumid = 1) and
(threadid not in (select top 0 threadid from mf_thread
where (forumid = 1))) order by threadid desc

27,580

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 应用实例
社区管理员
  • 应用实例社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧