title: Handle multiple resultsets from sql in GO lang using GORM
body: <p>The previous similar questions dates back to 2012 which had no solution so I had to ask afresh.</p>
  
  <pre><code>struct type DualTable{
    table1 []Table1
    table2 []Table2
    }
  
    struct type Table1{
    A string
    B string
    }
  
    struct type Table2{
    P string
    Q string
    }
  
    var dualtable []DualTable
    var table1 []Table1
    var table2 []Table2
  
    func main(){
    //trial 1 :failed as i get only table1 result
    db.Raw("select * from table1 select * from table2").Scan(&amp;table1).Scan(&amp;table2)
  
      //trial 2 :failed as i get only table2 result
    db.Raw("select * from table2 select * from table1").Scan(&amp;table1).Scan(&amp;table2)
  
    //trial 3 : failed as got nothing
    db.Raw("select * from table1 select * from table2").Scan(&amp;dualtable)
  }
  </code></pre>
  
  <p>As you can see what I'm trying to do.<br>
  I'm trying to get both tables results in the DualTable struct <br>
  But only the first query seems to run.</p>
  
  <p>The actual code consists of extremely long structs and is confidential so I can't post it here.</p>