2008-09-30 検索条件に検索結果の値を使う MySQL SELECT id,parent_id FROM child where id not like concat('%',parent_id,'%');