Hi Kalyani, > select ID from TableA where column2 like '%test%' or column4like > '%test%' or column5 like '%test%' or column6 like '%test%' or column7 > like '%test%' or column8 like '%test%' order by column3 desc;
As already stated, the like operator can't use indexes if you use "or", or start with a wild card. Is each '%test%' in your example meant to be the same string, or different strings? If different, then what exactly is each column storing, and what are you trying to search for? Perhaps you could make each column more "atomic" by splitting the contents into more columns, which you could then search using "=" instead of "like" and so use indexes. Tom BareFeet -- One stop Australian on-line shop for Macs and accessories http://www.tandb.com.au/forsale/?ml _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users