问一个select语句 select xfrom table1group by xhaving count(*)<=5 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 错了是order bySELECT * FROM `article` WHERE cateidIN ( 7, 12 ) having count(*)<=5order by cateid;一个结果也没有 CREATE TABLE `article` ( `articleid` int(10) unsigned NOT NULL auto_increment, `cateid` int(10) NOT NULL default '0', `posttime` int(10) unsigned NOT NULL default '0', `author` varchar(50) NOT NULL default '', `title` varchar(100) NOT NULL default '', `description` text, `clicktimes` int(10) unsigned NOT NULL default '0', `rating` int(2) NOT NULL default '0', `votes` smallint(6) NOT NULL default '0', `ipaddress` varchar(16) NOT NULL default '', `commentnum` smallint(8) NOT NULL default '0', `published` enum('y','n') NOT NULL default 'n', PRIMARY KEY (`articleid`), KEY `postid` (`articleid`), KEY `published` (`published`)) select x as a from table1 group by xwhile SELECT * FROM `article` WHERE x=a order by cateid limit 5;用循环吧!一条语句实现不了。 mysql设置事务隔离级别没有效果??? 每次启动mysql服务杀毒软件都会提示amd.dll病毒 求mysql查询语句 MySql如何实现远程控制? mysql更新 php访问mysql的问题 请问 redhat9 5432端口Ping 不通 怎么解决?(在线等待) 网络出不去国外,急求mysql的2000下和98下的odbc驱动,我最多只能给66分了。在线给分 MySQL: Unknown character set: 'utf8mb4怎么解决 ibdata1丢失,怎么恢复,能恢复数据结构就行了 帮人问个问题。有分。 从远程链接MYSQL数据库速度慢
FROM `article`
WHERE cateid
IN ( 7, 12 )
having count(*)<=5
order by cateid;一个结果也没有
`articleid` int(10) unsigned NOT NULL auto_increment,
`cateid` int(10) NOT NULL default '0',
`posttime` int(10) unsigned NOT NULL default '0',
`author` varchar(50) NOT NULL default '',
`title` varchar(100) NOT NULL default '',
`description` text,
`clicktimes` int(10) unsigned NOT NULL default '0',
`rating` int(2) NOT NULL default '0',
`votes` smallint(6) NOT NULL default '0',
`ipaddress` varchar(16) NOT NULL default '',
`commentnum` smallint(8) NOT NULL default '0',
`published` enum('y','n') NOT NULL default 'n',
PRIMARY KEY (`articleid`),
KEY `postid` (`articleid`),
KEY `published` (`published`)
)
while
SELECT * FROM `article` WHERE x=a order by cateid limit 5;
用循环吧!一条语句实现不了。