平成31/ 2019-04-25 07:53
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