Question

I want to execute a SELECT query which would return limited number of records in Dynamic SQL for Firebird database server.

similar to the one in SQL of MSSQL

 SELECT TOP 10 * FROM table;

P.S., i am using interbase 6.0 database with firebird 2.5 odbc driver.

Was it helpful?

Solution

You can't do this with InterBase 6.0 as it doesn't have this feature. FIRST n SKIP m was added in Firebird 1.0, and ROWS m TO n was added in Firebird 2.0, and SQL standard OFFSET/FETCH was added in Firebird 3. That you use the Firebird 2.5 ODBC driver(*) is irrelevant: you can only use the features offered by InterBase 6.

InterBase 6 is now +/- 15 years old. You should really consider upgrading, either to Firebird 2.5 or a recent version of InterBase.

(*): There is no Firebird 2.5 ODBC driver, the latest version of the Firebird ODBC driver is 2.0.2

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top