select title from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1)
SELECT TITLE FROM NET_ARTICLE WHERE ARTICLEID IN (SELECT ARTICLEID FROM NET_ARTICLE_ARTICLECLASS WHERE CLASSID = '107' AND ISDELETED != 1) AND ROWNUM <= 5
[SQL] select * from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) AND rownum <= 1[Err] 1054 - Unknown column 'rownum' in 'where clause' 我用的mysql的库,是咋回事啊?
SELECT TOP 5 TITLE FROM NET_ARTICLE WHERE ARTICLEID IN (SELECT ARTICLEID FROM NET_ARTICLE_ARTICLECLASS WHERE CLASSID = '107' AND ISDELETED != 1)
你用MYSQL跑这来问,晕,试一试这个吧 select * from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) limit 0,4
Select * From ( Select Rownum num,Title From Net_Article Where Articleid In (Select Articleid From Net_Article_Articleclass Where Classid = '107' And Isdeleted != 1) And Rownum <=5 ) b Where b.Num > 0 这是oracle分页。select title from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) limit 0,5 这是mysql分页。
mysql用limit 0 5,返回前5条
select title from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) limit 5
这样吧,我写的句子是这个样子的,现在这个title返回之后就是几百个,我现在就想要5个,能在上面直接改下么?
select title from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1)
FROM NET_ARTICLE
WHERE ARTICLEID IN (SELECT ARTICLEID
FROM NET_ARTICLE_ARTICLECLASS
WHERE CLASSID = '107' AND ISDELETED != 1)
AND ROWNUM <= 5
我用的mysql的库,是咋回事啊?
FROM NET_ARTICLE
WHERE ARTICLEID IN (SELECT ARTICLEID
FROM NET_ARTICLE_ARTICLECLASS
WHERE CLASSID = '107' AND ISDELETED != 1)
select * from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) limit 0,4
Select Rownum num,Title
From Net_Article
Where Articleid In (Select Articleid
From Net_Article_Articleclass
Where Classid = '107'
And Isdeleted != 1)
And Rownum <=5 ) b
Where b.Num > 0
这是oracle分页。select title from net_article where articleid in (select articleid from net_article_articleclass where classid='107' and isdeleted !=1) limit 0,5
这是mysql分页。