select with limit on firebird

5

I do in mysql to search the last 1000 regitros:

select * from tabela order by id desc limit 1000;

Now, how do you do this in Firebird?

This way I get the following error message:

  

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

asked by anonymous 20.05.2015 / 22:07

1 answer

5
SELECT FIRST 1000 * FROM tabela ORDER BY id DESC;

LIMIT is a unique clause of PostgreSQL and MySQL.

    
20.05.2015 / 22:47