err = rows.Scan(&ID, &name, &surname, &phone, &fax)
It gives me the results for A.ID, A.name, A.surname
but not for B.phone, B.fax
Please help
Willvar rows *sql.Rows
rows, err = stmt.Query()
if err != nil {
myResult = "db.Prepare error2: " + err.Error()
return myResult, "error"
}
defer stmt.Close()
First, an inner join is performed. Then, for each row in T1 that does not satisfy the join condition with any row in T2, a joined row is added with null values in columns of T2. Thus, the joined table always has at least one row for each row in T1.