1 CREATE TABLE IF NOT EXISTS `master` (
2 `id` INTEGER PRIMARY KEY
5 CREATE TABLE IF NOT EXISTS `detail` (
6 `id` INTEGER PRIMARY KEY,
8 FOREIGN KEY (`master_id`) REFERENCES `master` (`id`)
11 SELECT m.`id` m_id, d.`id` d_id
13 LEFT JOIN `detail` d ON d.`id` = (
16 WHERE dd.`master_id` = m.`id`
31 SELECT 'foo' UNION ALL