2011/12/2, colombus <[email protected]>:
> I want to search this database I will search Emp Name & Emp Desc for example
> If Search EMP I will get results as EMP1 , this is EMP1, EMP2, this is EMP2.
> I need to order this search in such a way that I get the Emp Name Column
> first then I will get the Emp Desc Column. So the result should be as
> follows. EMP1, EMP2, this is EMP1, this is EMP2. Is it possible to implement
> this in one query in Sqlite ???

SELECT id, name FROM emp WHERE name LIKE '%emp%'
UNION ALL
SELECT id, descr FROM emp WHERE descr LIKE '%emp%';
-- 
Kit
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to