Re: [sqlite] Use of two columns for a key and query on first clm.

2008-03-21 Thread Wilson, Ron P
order by id is not guaranteed. use 'order by id' and it will. Ron Wilson, S/W Systems Engineer III, Tyco Electronics, 434.455.6453 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Neville Franks Sent: Thursday, March 20, 2008 8:07 PM To:

Re: [sqlite] Use of two columns for a key and query on first clm.

2008-03-20 Thread Neville Franks
Let me rephrase the question slightly. If I do select * from table where clm1='def'; then step through the results will I see all rows that include 'def'. The answer must be yes. The only issue is what order they will be in. If I want them ordered by clm2 then yes I'd probably need use ORDER

Re: [sqlite] Use of two columns for a key and query on first clm.

2008-03-20 Thread John Stanton
No, use ORDER BY Neville Franks wrote: > If I use two columns for a key (primary or separate index) and query > just on the first column component will I always get back the first > match in a set. For example. > > - > create table mytable ( clm1 text collate nocase, clm2 text collate