Guest_imported
New member
- Jan 1, 1970
- 0
I wanted to create a table with a varying prefix but it generates this error:
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '@ID_sample'.
Here's the T-SQL statement I used:
declare @ID varchar(10)
set @ID='samp'
create table @ID_sample (
sampID char(10)
)
This is just my prototype. I am supposed to do this in a stored procedure but I wanted to test it on query analyzer first. I hope you could help me.
Server: Msg 170, Level 15, State 1, Line 4
Line 4: Incorrect syntax near '@ID_sample'.
Here's the T-SQL statement I used:
declare @ID varchar(10)
set @ID='samp'
create table @ID_sample (
sampID char(10)
)
This is just my prototype. I am supposed to do this in a stored procedure but I wanted to test it on query analyzer first. I hope you could help me.