CREATE proc createtable
as
begin
DECLARE @SQLString NVARCHAR(MAX)
SET @SQLString = 'CREATE TABLE Tab_'+convert(varchar,getdate(),112) + '( id bigint,name varchar(200))'
EXEC sp_executesql @SQLString
end
output :
Join the conversation! Your thoughts help the community grow.
Sign in to leave a comment
It is the same account you read, post and publish with — and you will come straight back to this page.
Arjun DhilodPosted Feb 10, 2014, 3:28 AM
okey thank you for reply
Priti KumariPosted Feb 10, 2014, 3:22 AM
above example help you to create dynamic table in Sql
Arjun DhilodPosted Feb 10, 2014, 2:29 AM
hi you know How to create dynamic table in mssql and insert value from textfiled using C#?