Versions available for this page: CUBRID 8.2.1 |
You can insert data by including a query as one of the VALUES items in the INSERT statement.
INSERT INTO table_name [ ( attribute_list ) ]
VALUES ( value_list, query_statement ) [ ; ]
The following is an example of inserting the information about Wang Ki-chun, 2008 Beijing Olympics silver medalist in men's 73kg Judo into the athlete table.
INSERT INTO athlete VALUES (16800, 'Wang Ki-chun','M',SELECT code FROM nation WHERE name ='Korea', 'Judo');