-3

Does MYSQL allow for the use of TOP in the select statement?

SELECT TOP 2 id
From product
Chon A
  • 33
  • 1

2 Answers2

0

In MySQL it's called LIMIT and goes near the end of the query:

SELECT id
FROM product
LIMIT 2

Manual: SELECT statement, LIMIT clause

Jiří Baum
  • 6,697
  • 2
  • 17
  • 17
0

MySQL equivalent to TOP is LIMIT.

So your query would be

SELECT ID FROM PRODUCT LIMIT 2
David Warren
  • 177
  • 12