You are here: about Efficiency « MsSQL Server « IT news, forums, messages
about Efficiency

Posted by yicong on 09/20/06 08:51

I want to select one field from a table,but it should on some conditions
which refer to 5 table ,such as A.FILED1=B.FIELD1 AND B.FIELD2=C.FIELD3 AND
....
Should I use case "select sum(a.amount) from a,b,c,... where
a.field1=b.field1 and b.field2=c.field2 and ..." or "select sum(a.amount)
from select b.field1 from select c.field2 from...."?And which case is more
efficiency?
thanks!

我想计算一个表中的某个字段的和,但此记录需在从多个表中查询此记录是否满足特定的条件。那么我是用select ..from ...where ..and ..and..and ..and ..还是用select ..from
select ..from select ..from ......?请问是哪一个效率高?
谢谢!

 

Navigation:

[Reply to this message]


校写邪谢械薪薪邪褟 褉邪斜芯褌邪 写谢褟 锌褉芯谐褉邪屑屑懈褋褌芯胁  •  袣邪泻 蟹邪褉邪斜芯褌邪褌褜 薪邪 Google AdSense  •  England, UK  •  褋褌邪褌褜懈 薪邪 邪薪谐谢懈泄褋泻芯屑  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

小邪泄褌 懈蟹谐芯褌芯胁谢械薪 胁 小褌褍写懈懈 袙邪谢械薪褌懈薪邪 袩械褌褉褍褔械泻邪
懈蟹谐芯褌芯胁谢械薪懈械 懈 锌芯写写械褉卸泻邪 胁械斜-褋邪泄褌芯胁, 褉邪蟹褉邪斜芯褌泻邪 锌褉芯谐褉邪屑屑薪芯谐芯 芯斜械褋锌械褔械薪懈褟, 锌芯懈褋泻芯胁邪褟 芯锌褌懈屑懈蟹邪褑懈褟