select with limit in Firebird

Asked

Viewed 3,105 times

6

I do in mysql to fetch the 1000 last regions:

select * from tabela order by id desc limit 1000;

Now, how do you do it in the Firebird?

doing so have the following error message:

Dynamic SQL Error -SQL error code = @1 -Token Unknown - line @1, column @2 -@1

1 answer

9


SELECT FIRST 1000 * FROM tabela ORDER BY id DESC;

LIMIT is an exclusive clause of Postgresql and Mysql.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.