Using join to add values from two different tables

Code examples

1
0

insert value to new table by joining 2 different tables

INSERT IGNORE INTO table ( col1 , col2, col3, col4)
SELECT p.col1, p.col2, c.col3, c.col4
FROM table1 p
INNER JOIN table2 c ON c.Id = p.Id

Similar pages

Similar pages with examples

In other languages

This page is in other languages

Русский
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................