1.请用SQL语句检索出图中阴影部分(A和B都表示两个表, 都有ID这个字段)
CREATE TABLE `zl_tb_a` (
`id` int(20) DEFAULT NULL,`name` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
CREATE TABLE `zl_tb_a` (
`id` int(20) DEFAULT NULL,
`pid` int(20) DEFAULT NULL,
`name` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8
SELECT b.id, b.`pid`, b.`name` FROM zl_tb_a a RIGHT OUTER JOIN zl_tb_b b ON a.`id` = b.`pid`
WHERE b.`pid` NOT IN (SELECT id FROM zl_tb_a a);