select *
from (select *
from hbc
order by cmc desc
limit 10) as ss
union
select *
from hbc
where qph>0
or hctl=1;
---
() ascii ribbon campaign against html e-mail
/\ www.asciiribbon.org
> -----Original Message-----
> From: [email protected] [mailto:sqlite-users-
> [email protected]] On Behalf Of YAN HONG YE
> Sent: Friday, 15 June, 2012 03:57
> To: [email protected]
> Subject: [sqlite] order by clause should come after union not before
>
> select * from hbc order by cmc desc limit 10
> union
> select * from hbc where qph>0
> union
> select * from hbc where hctl=1
>
> this sql cmd cause the error:
> order by clause should come after union not before
>
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users