I have SQL Server script that has scalar variable that can be used in single execution scripts
Just want to ask is there any way I can declare scalar variable like in PostgreSQL.
See sample code below:
DECLARE @samplevar varchar(max)= null
set @samplevar = 'test'
select @samplevar
PS: This is not in function nor stored procedure. This is TSQL execution
Thanks