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

帮忙优化一条SQL语句解决方法

2012-02-28 
帮忙优化一条SQL语句select distinct SaleWholesalerID,SaleFileNo,SaleContract,SaleDate,Sale.other fro

帮忙优化一条SQL语句
select distinct SaleWholesalerID,SaleFileNo,SaleContract,SaleDate,Sale.other from ((Sale left join Wholesaler on Sale.SaleWholesalerID=Wholesaler.WholesalerID) left join Product on Sale.SaleProductID=Product.ProductID) where PayDate>=#"&StartDate&"# and PayDate<=#"&EndDate&"# order by SaleDate desc,SaleFileNo desc


数据库ACCESS

各位高手.帮忙看一下

[解决办法]
PayDate , SaleDate, SaleFileNo 都在哪个表中。

语句没什么可改变的了,需要做的是添加适当的索引。

热点排行