QUOTE(phyckeryz @ May 15 2017, 10:01 AM)
hi master.. i hope can ask guide from u guys here..
my issue here how to sum data in one of table field and insert into second table the total value..
for ur easy understand i put the sample table figure below..
[attachmentid=8814800]
how to query master..

my issue here how to sum data in one of table field and insert into second table the total value..
for ur easy understand i put the sample table figure below..
[attachmentid=8814800]
CODE
INSERT INTO `table2` ('a',(
SELECT SUM(harga)
FROM `table1`
WHERE id = 'a'
GROUP BY `a`
)
);
Dear ts.. sila rajin rajin guna tool macam
http://sqlfiddle.com/
This post has been edited by alien3d: May 15 2017, 11:10 AM
May 15 2017, 11:09 AM

Quote
0.0142sec
0.65
7 queries
GZIP Disabled