Subject RE: [firebird-support] using select count(*)
Author Alan McDonald
>
> In our triggers and stored procedures we use
>
> select count(*)
> from table
> where value = Primary Key.value
>
> to determine whether we should run an insert or an update
> query on triggered tables.
>
> Is there a faster way?
>
> I am half way through Helen's book "The firebird book"
>
> She suggests never using select count(*) but I do not know a
> faster way of doing this.
>
> Regards,
>
> Robert.

heavens - just select/return the pk value itself - there's only ever one of
them anyway!
Alan