I'm working on project to display stock information in a website. And i want to ask how to combine two tables in SQL.
Suppose we have Table1
stock_id date p_high p_low
------------------------------------
3 2013-02-26 100 80
3 2013-02-25 100 80
3 2013-02-24 100 80
1 2013-02-24 100 80
3 2013-02-23 100 80
2 2013-02-23 100 80
And we have Table2
stock_id date open high low close volume
---------------------------------------------------------
3 2013-02-24 90 110 70 90 250
3 2013-02-23 90 110 70 90 250
2 2013-02-23 90 110 70 90 250
3 2013-02-22 90 110 70 90 250
3 2013-02-21 90 110 70 90 250
1 2013-02-21 90 110 70 90 250
And i want to combine the date and display all the data like this,
Update: I want to combine the date and the stock_id
stock_id date open high low close volume p_high p_low
------------------------------------------------------------------------
3 2013-02-26 100 80
3 2013-02-25 100 80
3 2013-02-24 90 110 70 90 250 100 80
3 2013-02-23 90 110 70 90 250 100 80
3 2013-02-22 90 110 70 90 250
3 2013-02-21 90 110 70 90 250
Thank you for your help.