首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > SQL Server >

一个简单的多表查询的有关问题,请赐教

2012-03-21 
一个简单的多表查询的问题,请赐教。table a 中的字段aa,bb,cctable b 中的字段ee,ff,hh查询a中的aa,与b中的

一个简单的多表查询的问题,请赐教。
table a 中的字段aa,bb,cc
table b 中的字段ee,ff,hh
查询a中的aa,与b中的ee字段,条件是 bb的大小在ff 与hh之间。谢谢。
我的查询语句:
select a.aa, b.ee from table a, b where a.bb between b.ff and b.hh.


[解决办法]
select a.aa, b.ee from a, b where a.bb between b.ff and b.hh

哦,是把table删除,留下from
[解决办法]
select distinct a.aa from a, b where a.bb between b.ff and b.hh

热点排行