mysql query issue
Let's assume I have开发者_开发问答 the below table
mysql> desc countrylist;
+---------+-------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+---------+-------------+------+-----+---------+-------+
| country | varchar(32) | YES | | NULL | |
+---------+-------------+------+-----+---------+-------+
1 row in set (0.02 sec)
While querying the table, I always want 'USA' in the result whether or not the value is there in the table, in addition to other countries in the table. How do I handle that?
TIA.
James.
You can use UNION
:
SELECT country FROM countrylist
UNION
SELECT 'USA'
精彩评论