mysql多表链接查询

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

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

posted @ 2016-11-02 11:17  次序  阅读(180)  评论(0)    收藏  举报