如何在Sqlite中获取Nemayeh.Nemayeh字段的前10条记录?
SELECT
Keyword,
Nemayeh.Nemayeh
FROM
(SELECT
Keyword.Id,
Keyword.Keyword
FROM Keyword
ORDER BY Keyword.Keyword ASC
LIMIT 10 OFFSET 0
) AS tmp
INNER JOIN KeyWord_Nemayeh
ON KeyWord_Nemayeh.Id_Keyword = tmp.Id
INNER JOIN Nemayeh
ON Nemayeh.Id = KeyWord_Nemayeh.Id_Nemayeh
ORDER BY 1,2
例如:
示例:
Key1 Nem1_1
Key1 Nem1_2
Key1 Nem1_3
.
.
.
Key1 Nem1_10
Key2 Nem2_1
Key2 Nem2_2
.
.
.
Key2 Nem2_10
Nemayeh.Nemayeh
值?(将LIMIT 10
添加到查询中太简单了 :)) - biziclop