content_image/869525.jpg content_image/869545.jpg content_image/869538.jpg content_image/869539.jpg content_image/869540.jpg content_image/869541.jpg
<img src='content_image/869525.jpg'>

3 rows in set (0.00 sec) 

<img src='content_image/869545.jpg'>

## Important 

VALUES  with one or more instances of ROW()  acts as a table value constructor; although it can be used to supply values in an INSERT  or REPLACE  statement, do not confuse it with the VALUES  keyword that is also used for this purpose. You should also not confuse it with the VALUES()  function that refers to column values in INSERT ... ON DUPLICATE KEY UPDATE . 

You should also bear in mind that ROW()  is a row value constructor (see Section 13.2.11.5, “Row Subqueries” , whereas VALUES ROW()  is a table value constructor; the two cannot be used interchangeably. 

VALUES  can be used in many cases where you could employ SELECT , including those listed here: 

•With UNION , as shown here: 

mysql> SELECT 1,2 UNION SELECT 10,15; 

<img src='content_image/869538.jpg'>

2 rows in set (0.00 sec) 

mysql> VALUES ROW(1,2) UNION VALUES ROW(10,15); 

<img src='content_image/869539.jpg'>

2 rows in set (0.00 sec) 

It is also possible in this fashion to union together constructed tables having more than one row, like this: 

mysql> VALUES ROW(1,2), ROW(3,4), ROW(5,6) > UNION VALUES ROW(10,15),ROW(20,25); 

<img src='content_image/869540.jpg'>

5 rows in set (0.00 sec) 

You can also (and it is usually preferable to) omit UNION  altogether in such cases and use a single VALUES  statement, like this: 

mysql> VALUES ROW(1,2), ROW(3,4), ROW(5,6), ROW(10,15), ROW(20,25); 

<img src='content_image/869541.jpg'>

