Subject Re: [firebird-support] Re: The First to select
Author Richard Wesley
On Feb 13, 2006, at 14:49, Ann W. Harrison wrote:

> Rdb$database is a table known to have exactly one row. The where
> exists will stop when it finds the first null. Your syntax will
> read the whole table, returning a series of 1's. Our "first" syntax
> is unique to us. So, for that matter is rdb$database. However
> many databases offer some table that is guaranteed to have exactly
> one row.

Interestingly enough, I was trying to come up with a method that
would work for all the database engines we support. They all have a
variant of FIRST:

Firebird: select first 1 ...
MySQL: select ... limit 1
MS Jet, MS SQL Server: select top 1...
Oracle: select * from (select ...) where rownum <= 1;

None of them have Rdb$database however ;-)
________________________________________________________
Richard Wesley Software Engineer
Tableau Software
(w) +1-206-633-3400x505
hawkfish@...
http://www.tableausoftware.com/



----------


Visual Thinking for Business Intelligence



[Non-text portions of this message have been removed]