Saturday 4 November 2017

MSSQL - How to fix error - Incorrect syntax near '='.

Watch this example on YouTube


 
To fix it replcae

Declare @temp int = 2;
if @temp == 2
Begin
  print ('found')
End
Else
Begin
  print ('not found')
End

with

Declare @temp int = 2;
if @temp = 2
Begin
  print ('found')
End
Else
Begin
  print ('not found')
End

No comments:

Post a Comment