开发者

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'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜