(澳门银河官网网址) 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

广告位

澳门银河官网