List:General Discussion« Previous MessageNext Message »
From:Jay Ess Date:November 4 2009 3:41pm
Subject:Re: Alphabetical search to and from
View as plain text  
Or :
alter table users add first_f_name char(1) not null;
create index first_f_name_idx on users (first_f_name);
update users set first_f_name = left(first_name,1);

And not the query will use index.
select username from users where first_f_name between "A" and "B";
Thread
Alphabetical search to and fromDave M G4 Nov
  • Re: Alphabetical search to and fromJay Ess4 Nov
  • RE: Alphabetical search to and frommisiaQ4 Nov
    • Re: Alphabetical search to and fromMichael Dykman4 Nov
      • RE: Alphabetical search to and frommisiaQ4 Nov
        • Re: Alphabetical search to and fromMichael Dykman4 Nov
          • Re: Alphabetical search to and fromJay Ess4 Nov
            • RE: Alphabetical search to and frommisiaQ4 Nov
              • Re: Alphabetical search to and from [SOLVED]Dave M G5 Nov
  • Re: Alphabetical search to and fromSteve Edberg4 Nov