日期:2014-05-16  浏览次数:20715 次

mysql 不支持子查询 。那应该如何实现查询啊。
sql = "select bld01 from bld where bld02=103 and bld14=(select blm01 from blm where blm03='192.168.1.201') "不能执行。 由于MYSQL版本不支持

但是也不可能换数据库版本

大家看有什么好办法能够实现这个功能,

------解决方案--------------------
sql = "select bld01 from bld where bld02=103 and bld14 in (select blm01 from blm where blm03='192.168.1.201') "
------解决方案--------------------
select distinct bld.bld01 from bld,blm where bld.bld02=103 and bld.bld14=blm.blm01 and blm.blm03='192.168.1.201'