平成30/ 2018-10-23 22:01
MYSQL/UNION


select id as kaiin_id, name, 0  as hikaiin_id  from kaiin where name like 'auau%'
union
select 0  as kaiin_id, name, id as hikaiin_id from hikaiin where name like 'auau%'

kaiin_id, name, hikaiin_id
------------------------
10, aaa, 0
11, aaa, 0
0,  aaa, 10
0,  aaa, 13