A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
Hi @Anonymous ,
Thanks for your update.
In your situation, you could use a regular = predicate instead of contains as below:
insert into users(name,lastname) values
('BILL TURNER','WHITE GATES'),
('BILL WEST','EAST GATES')
SELECT top 5 name,lastname FROM USERS
WHERE
CONTAINS((name, lastname),'BILL AND GATES')
OR (Name='BILL' AND lastname='GATES')
OR
SELECT top 5 name,lastname
FROM USERS
WHERE (CONTAINS(Name, 'BILL AND GATES') OR
CONTAINS(lastname, 'BILL AND GATES'))
OR (Name='BILL' AND lastname='GATES')
Output:
name lastname
BILL GATES KENNDY
ROGERS BILL GATES
BILL GATES
Best regards
Melissa
If the answer is helpful, please click "Accept Answer" and upvote it.
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.