码迷,mamicode.com
首页 > 数据库 > 详细

mysql多表查询

时间:2017-02-05 11:10:16      阅读:182      评论:0      收藏:0      [点我收藏+]

标签:rom   and   div   多表查询   多表   mysql   sql   pre   logs   

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 上海%)));

 

mysql多表查询

标签:rom   and   div   多表查询   多表   mysql   sql   pre   logs   

原文地址:http://www.cnblogs.com/thankyouGod/p/6366937.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!