List:General Discussion« Previous MessageNext Message »
From:Stefan Schmiedl Date:May 30 1999 7:38pm
Subject:LIKE or = ?
View as plain text  
Alexander I. Barkov wrote:

AIB> I think that this qyery is what you want:

AIB> SELECT
AIB>         sum(category LIKE "pc_digital_camers") as count0,
AIB>         sum(category LIKE "pc_memory") as count1,
AIB>         ...........
AIB>         sum(caterogy LIKE "something_else") as count12
AIB> FROM
AIB>         items;

Hi,

why should you use LIKE when there are no wildcards in the string?
Case ignorance? Performance? Preparation for using wildcards later?

Regards,
S.
--
Stefan Schmiedl
Loreleystr. 5, 94315 Straubing, mailto: s@stripped
Tel.: +49 (0) 9421 923916, Fax: +49 (0) 69 791 224466


Thread
Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayAlexander I. Barkov30 May
    • LIKE or = ?Stefan Schmiedl31 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayGraham Ashton30 May
Re: Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
  • Re: Multiple counts as an arrayJim Faucette30 May
Re: Multiple counts as an arrayDarren Sweeney30 May
  • Re: Multiple counts as an arraySasha Pachev30 May