想咨询一下这样一个SQL 语句 有没有更精简的写法? select s.title,(select count(*) from gw_product_sort where pid=3 ) as b from gw_product_sort s where s.id=3这个语句是想 查询某个产品分类名称和其下的子分类个数如果想要查询多个产品分类名称和对应子分类个数的话,语句又该怎么写呢? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select s.title,b.number FROM gw_product_sort s,(select count(*) as number from gw_product_sort where pid=3) bwhere a.title=b.title select s.title,(select count(*) from gw_product_sort where pid=3 ) as b from gw_product_sort s where s.id in (1,3,4) select a.title,count(*) from gw_product_sort a inner join gw_product_sort b on a.id = b.pid where a.id in (?,?,?) group by a.id 大家有Mysql存储引擎的源代码分析吗? 如何实现mysql跨机房复制的高可用性? 求sql实现方法 MariaDB 在 Windows 下 noinstall 版本的安装和使用 phpmyadmin乱码 有谁知道My Sql怎样显示用户名啊 有没有谁做过c连mysql呀,api或odbc都可以 mysql 求一段语句 , 高手进来帮忙 , 感激! mysql插入150条简单数据竟用了6秒,附统计分析 mysqli query删除语句成功失败都返回是1 mysql 有两列a和b 现在想让列a-列b作为列c , 再求列c 的和,可以用一条语句执行吗? 循环重复
FROM gw_product_sort s,(select count(*) as number from gw_product_sort where pid=3) b
where a.title=b.title