there are 2 tables

t1

  • id name
  • 1 aaa
  • 2 bbb
  • 3 ccc

t2

  • id name
  • 1 qwe
  • 2 asd
  • 3 zxc

you need to select everything by id key and so that t1.name becomes name1 and t2.name becomes name2

and to get

  • id name1 name2
  • 1 aaa qwe
  • 2 bbb asd
  • 3 ccc zxc
  • SELECT * FROM t1,t2 WHERE t1.id=t2.id - Akina
  • @Akina - thanks for the tip, but this is not what I was asking ... - Enforcer
  • one
    This is called select t1.name as name1, t2.name as name2 - Mike
  • @Mike Thank you so much (: - Enforcer

0