James
James

Reputation: 93

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.

Upvotes: 1

Views: 34

Answers (1)

Mark Byers
Mark Byers

Reputation: 837996

You can use UNION:

SELECT country FROM countrylist
UNION
SELECT 'USA'

Upvotes: 3

Related Questions