Why does declare @x int = 1, @y int = @x; not work in SQL Server?
Question:
This code:
declare @x int = 1, @y int = @x;
gives the error:
Must declare the scalar variable "@x".
I read through the Microsoft documentation for the DECLARE keyword along with some other sources, but none thoroughly explained this beha...
databasedev.hashnode.dev2 min read