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
Post a Comment