I using MySQL, I have 2 Query Select SQL, first Query will return Result A, and second will return Result B, so i want to combine that two Query Result, ID column of Result A and value_num of Result B become standard Column, and i don’t think for use subselect because i have tried that and it will take long time effort in query process , how can i do this ?
Result A :
+------------+--------------+
+ ID + Name +
+------------+--------------+
+ 1 + Steve +
+ 2 + Mile +
+ 3 + Santo +
+ 4 + Del Piero +
+ 5 + Jack +
============================+
Result B :
+------------+--------------+
+ Valuenum + value +
+------------+--------------+
+ 1 + 20 +
+ 2 + 30 +
+ 6 + 44 +
+ 7 + 55 +
============================+
Combine Result A dan Result B, below is my expect output.
+------------+--------------+----------+
+ID_valuenum + Name + value +
+------------+--------------+----------+
+ 1 + Steve + 20 +
+ 2 + Mile + 30 +
+ 3 + Santo + Null +
+ 4 + Del Piero + Null +
+ 5 + Jack + Null +
+ 6 + Null + 44 +
+ 7 + Null + 55 +
============================+==========+
Thanks
1 Answer