Select from multiple tables without a join?

后端 未结 8 1169
轻奢々
轻奢々 2020-12-05 01:53

What is the easiest way to select data from two tables and rather than join them, have them appear as separate rows. Both tables have similar or matching fields and I want t

8条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-05 02:18

    select 'test', (select name from employee where id=1) as name, (select name from address where id=2) as address ;

提交回复
热议问题