What is wrong with the below T-SQL batch statement ?

@find varchar(30);
SET @find = 'ABC';
SELECT LastName FROM Person WHERE LastName = @find;

 Posted by Bandi on 8/29/2017 | Category: Sql Server Interview questions | Views: 1262 | Points: 40
Select from following answers:
  1. can't use the @find parameter in a query
  2. should use SELECT instead of SET
  3. nothing, its fine
  4. DECLARE is missing
  5. All Above

Show Correct Answer


| Alert Moderator 

Comments or Responses

Login to post response