Search
 
SCRIPT & CODE EXAMPLE
 

SQL

insert value to new table by joining 2 different tables

INSERT 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
Comment

PREVIOUS NEXT
Code Example
Sql :: sql constraints 
Sql :: com.mysql.jdbc.exceptions.MySQLNonTransientConnectionException: Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: mysql insert into multiple tables 
Sql :: aggregate functions 
Sql :: sql is not null 
Sql :: import database from sql file 
Sql :: add column mysql 
Sql :: join sql 
Sql :: inner join vs outer join 
Sql :: sql like operator 
Sql :: mysqldump 
Sql :: how do you insert boolean to postgresql 
Sql :: mysql update one table from another table multiple columns 
Sql :: sql Not like operator 
Sql :: non relational database 
Sql :: pl sql revoke role from user 
Sql :: how to find symmetric pairs in sql 
Sql :: tipos da linguagem SQL 
Sql :: how to list all values of a column that start with a letter in sql 
Sql :: postgresql interview questions 
Sql :: default column value in sql same as other column 
Sql :: Windows internal database connection 
Sql :: events not working db 
Sql :: concatenate sqlites 3 
Sql :: How can INSERT INTO a table 300 times within a loop in SQL? 
Sql :: mysl like insert a variable 
Sql :: java check if something is in mysql table 
Sql :: SQL Combining Multiple Operators 
Sql :: sql server: how to assign value to table variable returned from function 
Sql :: sql dcl queries 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =