(新葡京娱乐场) mysql select多个 count 时怎么写?
澳门新葡京官网
澳门新葡京官网
当前位置 : 澳门新葡京官网 > 新葡京娱乐场

(新葡京娱乐场) mysql select多个 count 时怎么写?

粗心了,少打了 select

第一种

SELECT count* FROM `bbs_thread` WHERE uid = 7 AS mythreads, COUNT* FROM bbs_post WHERE uid = 7 AS myposts

第二种

SELECT count* FROM `bbs_thread` WHERE uid = 7 AS mythreads, COUNT* AS myposts FROM bbs_post WHERE uid = 7

以上两种写法均不可行。

补充一下,是在 mysql 5.7.9

栏目列表

广告位

澳门新葡京官网