Having trouble with a T-SQL scalar variable during a create table I am still a beginner, but I am having trouble with a T-SQL scalar variable during a create table.   Can anyone tell me what is wrong with this script?

-- T-SQL MSSQL
SET NOCOUNT ON
DECLARE @tt = 'TempNWA'
--Create Temporary Table
CREATE TABLE [@tt] 
 (  [Table_Name] varchar(50),
    Row_Count int,
    Table_Size varchar(50),
    Data_Space_Used varchar(50),
    Index_Space_Used varchar(50),
    Unused_Space varchar(50)
 )
DROP TABLE [@tt]


The error I get, which I can't decipher is:

Incorrect syntax near '='
DECLARE @tt = 'TempNWA'


is missing any dataype declaration. You haven't explained what you are trying to do exactly but I assume you need something like.

SET NOCOUNT ON
DECLARE @TempTable SYSNAME = 'TempNWA'   


DECLARE @SQL NVARCHAR(MAX) = N'
CREATE TABLE ' + QUOTENAME(@TempTable) + N'  
 (  [Table_Name] varchar(50),
    Row_Count int,
    Table_Size varchar(50),
    Data_Space_Used varchar(50),
    Index_Space_Used varchar(50),
    Unused_Space varchar(50)
 );

DROP TABLE ' + QUOTENAME(@TempTable) + N';'

EXEC(@SQL)


You cannot parameterise object names so would need to use dynamic SQL for this See Dealing with Dynamic Table and Column Names for more.