0
我想搜索一個表,並使用1個變量搜索多個列。我代碼如下所示:如何使用一個變量搜索多個列
SELECT lCustomerID, sLastName, sFirstName, sAddress1, sAddress2,
sCity, sState, sZipcode , @search AS Expr1
FROM Customers
WHERE (sLastName = N'Includes @search')
OR (sFirstName = N'includes @search')
AND (sBarcode = N'includes @search')
我希望它包含字符串不等於
您的意思是有OR/AND?或者你的意思是「或」? –