declare @CustomerID uniqueidentifier <P><BR>set @CustomerID = '129F1B78-5373-4196-BE92-253762896ADB' </P> <P> </P> <P><BR>select a.* from opvoucher a <BR>WHERE (a.customercode = @CustomerID or @CustomerID is null ) </P> <P> </P> <P><BR>select a.* from opvoucher a <BR>WHERE (a.customercode = @CustomerID) </P> <P> </P> <P>为何 前一句 where子句利用不到索引?</P> <P> </P>
翻过高山走不出你
慕妹3242003
相关分类