I frequently see the syntax
Declare @var int; Set @var = 1;
But you can set the variable at declaration time
Declare @var int = 1;
Is there a gotcha to the latter option? Am I missing something that is internal or doesn't work in all cases where you should not declare and set the variable in the declaration?
I ask because of subtitle gotcha's that I hear which I would not expect. Like Aaron Bertrand lower casing data types which is something that msdn also does not state but has been found in the community.