値が最初の1000行に存在するかどうか、および値が情報を返すかどうかを確認する方法。
何かのようなもの
select cme_fbid
from table1 if exists(select cme_fbid from table1 limit 1000)
値が最初の1000行に存在するかどうか、および値が情報を返すかどうかを確認する方法。
何かのようなもの
select cme_fbid
from table1 if exists(select cme_fbid from table1 limit 1000)
SELECT
CASE
WHEN EXISTS(SELECT cme_fbid FROM table1 LIMIT 1000) THEN t.cme_fbid
ELSE NULL
END
FROM table1 t
select cme_fbid
from table1
where cme_fbid in (
select cme_fbid
from table1
limit 1000)
order by
一貫性のある/意味のある結果を得るには、おそらく内部クエリにを追加する必要があります。
サブクエリを使用して、表示するデータを制限します。
select cme_fbid
from (select * from table1 order by someThing limit 1000) x
where someField = someValue
select count(*) as cnt from table1 where cme_fbid is not null and cme_fbid <> 0 limit 1000 order by id
またはで使用mysql_row_count
する
select cme_fbid from table1 where cme_fbid is not null and cme_fbid <> 0 limit 1000 order by id