Ted Rolle wrote:
> SELECT *
> FROM fm
> WHERE name LIKE '%Julian%'
>   OR info LIKE '%' || name || '%'
> ORDER by name;
> 
> it returns 224 columns.
> 
> Perhaps I'm misunderstanding the concept.
> It could be returning 5 columns with 'Julian'
> AND all columns where column 'name' is LIKE column info.
> That would be a whole lot more.

It returns all rows where either name LIKE '%Julian%', OR info LIKE '%' || name 
|| '%'.

If you replace OR with AND, the query would return all rows where both name 
LIKE '%Julian%' AND info LIKE '%' || name || '%'. Naturally, this latter set is 
no larger than the former.

Igor Tandetnik

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to