I would like to perform the equivalent of SELECT TOP 1 ...
query in db2 / dashDB:
SELECT TOP 1 * FROM customers
How can I achieve this?
I would like to perform the equivalent of SELECT TOP 1 ...
query in db2 / dashDB:
SELECT TOP 1 * FROM customers
How can I achieve this?
You can achieve this query using the FETCH FIRST x ROWS ONLY
statement, E.g.
SELECT * FROM customers FETCH FIRST 1 ROWS ONLY
Another way on dashDB, and more easy for my opinion is to use the 'limit n', E.g.
SELECT * FROM customers LIMIT 1