mysql多表查询

select area from areas where cityid=(select cityid from cities where city like '杭州%') and id!=(select min(id) from areas where cityid=(select cityid from cities where city like '杭州%'));

select area from areas where cityid=(select cityid from cities where id=(select min(id) from cities where  provinceid=(select provinceid from provinces where province like '上海%')));

 

posted @ 2017-02-05 08:32  次序  阅读(187)  评论(0编辑  收藏  举报