数据库细节小问题

1 内层表可以利用外层表。例子如下:

1 select t1.CITY_ID,
2        t1.CITY_NAME,
3        t1.PRO_ID,
4        (select t2.PRO_NAME from T_BASE_PROVINCE t2 where t2.PRO_ID = t1.PRO_ID) PRO_NAME
5 from T_BASE_CITY t1

 

 

posted @ 2012-12-26 10:04  杨斌_济南  阅读(184)  评论(0编辑  收藏  举报