On 2/8/2013 12:08 AM, YAN HONG YE wrote:
my table has a table like this:
c5 c6 c7
9806062380 9806062380 9806062380
9806062480 9806062680 9806062680
9806063280 9806068980 9806068980
9806062980 9806067980 9806067980
9806062280 9806067880 9806067880
9806734080 9806068280 9806068380
9806069180 9806068380 9806068680
9806063180 9806068680 9806635280
I wanna to find in the column c5,c6,c7 include 9806067880 like this:
select * from mytable where * like '9806067880';
it's right?
No it's not. You can't use star like this. You have to spell out your
condition in full:
select * from mytable where c5='9806067880' or c6='9806067880' or
c7='9806067880';
Or a bit more compactly:
select * from mytable where '9806067880' in (c5, c6, c7);
--
Igor Tandetnik
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users