MySQL Join tables vertically

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chathura86
    New Member
    • May 2007
    • 227

    MySQL Join tables vertically

    i have two tables with some common column names, i want to create a table joining these tables vertically

    ex.
    one table contain deposits and another contain withdrawals, both tables have date and amount columns. other columns are different.

    i want to select date and amount columns from both tables and view it as a single table, so i can sort it or get the sum

    please let me know whether it is possible and how?

    Thank you
    Chathura Bamunusinghe
  • chathura86
    New Member
    • May 2007
    • 227

    #2
    hi guys

    found the answer :

    sql statement 1
    union
    sql statement 2

    chathura bamunusinghe

    Comment

    • ronverdonk
      Recognized Expert Specialist
      • Jul 2006
      • 4259

      #3
      That was fast! Good you found the answer yourself. See you around.

      Ronald

      Comment

      Working...