A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Milan
Agree with Ronen, to use CONTAINS, you need first create FULLTEXT catalog and you need a unique full-text index on the searched column.
How about using CHARINDEX for alternative, though I think it is no difference in performance with LIKE.
DECLARE @TEST TABLE (Brand VARCHAR(30), Product VARCHAR(30))
INSERT INTO @TEST VALUES
('Asus','ZenfoneSome'),
('Samsung','GalaxySome'),
('Huawei','MateSome')
SELECT Brand,Product
FROM @TEST
WHERE CHARINDEX(Brand,'Samsung GalaxySome')>0 AND CHARINDEX(Product,'Samsung GalaxySome')>0
Best regards,
LiHong
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our Documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Ronen Ariely