Skip to main content

Posts

Showing posts with the label how to insert values from another table in mysql

INSERT with SELECT

The SELECT command can also be used with insert in order to populate an existing table with matching  column data from another table. In this case, we have created a table like City and called it City2, then  added all the column/row data from the original City table in to this new table; INSERT INTO City2 SELECT * FROM City;