Subject | RE: [firebird-support] Very slow SQL |
---|---|
Author | Leyne, Sean |
Post date | 2007-08-21T18:54:04Z |
Ed,
select first 1 *
from ClientINfo
order by Client_ID desc
Sean
P.S. This is an extremely poor design.
> I have the following SQL statement:If you are looking for the last record try:
>
> select * from ClientINfo
> where Client_Id in (Select Max(Client_ID) from ClientInfo)
>
> where Client_ID is the primary key of ClientInfo.
select first 1 *
from ClientINfo
order by Client_ID desc
Sean
P.S. This is an extremely poor design.