Is it possible to use an IF clause within a WHERE clause in MS SQL?
(是否可以在MS SQL中的WHERE子句中使用IF子句?)
Example:
(例:)
WHERE
IF IsNumeric(@OrderNumber) = 1
OrderNumber = @OrderNumber
ELSE
OrderNumber LIKE '%' + @OrderNumber + '%'
ask by Bryan Roth translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…