im trying to select a country but with USA and CANADA first and others to be arranged alphabetically, so I have this query.
but the problem is when used this query with both select statement enclosed in brackets theres no row selected
(SELECT `country_name` FROM `country` as t2
WHERE `country_name` IN ('UNITED STATES','CANADA') )
UNION
( SELECT `country_name` FROM `country` as t3
WHERE `country_name` NOT IN ('UNITED STATES','CANADA')
ORDER BY `country_name` ASC )
but this one, first select statement without bracket it displays what I wanted..
SELECT `country_name` FROM `country` as t2
WHERE `country_name` IN ('UNITED STATES','CANADA')
UNION
( SELECT `country_name` FROM `country` as t3
WHERE `country_name` NOT IN ('UNITED STATES','CANADA')
ORDER BY `country_name` ASC )
what is the difference between the two? and why the first query doesn't display any row?
thanks in advance