select t1.title,COUNT(t2. arid) as count
from discusstopic as t1,topicarticle as t2
where t1.topicid=t2.topicid?
from discusstopic as t1,topicarticle as t2
where t1.topicid=t2.topicid?
解决方案 »
- mysql 同一个表内嵌套查询 parent_id
- ████莪在000webhost申请了一个免费的MYSQL空间、但是怎么也连不上去 ████
- mysql中一个账号对应俩库
- 怎样把MYSQL的库导入到SERVER2000里啊,麻烦高手给予指点!!!
- 请问如何用sql查询当前mysql库的字符集?
- mysql里怎么实现字段的自动+1?
- mysql支持的功能有多少?
- 写好的sql脚本怎么让他执行(命令行界面下)
- 关于mysql触发器更新本表数据的问题
- 急急的问大鸟们到哪里http.ftp上可以下mysql-3.23.19-beta-win.zip?
- 怎样访问远程数据库?
- 紧急求助:我的服务器掉电了,重新启动MYSQL启动不了了!!!错误如下:
from discusstopic a inner join topicarticle b on a.topicid=b.topicid
group by a.topicid order by ...
我的建议是只建立一张表,对贴主加一个字段orgin让它初值为-1
回复的帖子orgin都为0
查询时候分两个语句,这样效率是不是高些?
浅妄薄见,望与斟酌