sql - How to insert data from two tables into one table -



sql - How to insert data from two tables into one table -

i need insert values 2 tables 1 table. eg table 1 outward , table 2 product table. need insert values outward table , product table have productname needs inserted outward table. code

insert tbltrn_outward, tbltrn product(chalanno,godownsrno, igodownsrno,deladdress,outwarddate,productname,qty,boxes,rate,price,batchcombo,active,createdby,createdon,fyearsno) values('$chalanno','$godownsrno','$igodownsrno','$deladdress','$outwarddate','$productname','$qty','$boxes','$rate','$price','$batchcombo','$active','$createdby','$createdon','$fyearsrno')";

there basic:

insert tbltrn_outward(chalanno, godownsrno, ... ) select column1 , column2 , ... tbltrn_product

sql

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -