Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Trainings
Live
Learn
Career
Members
Blogs
Challenges
Certifications
Bounties
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Create table name dynamically in SQL server
WhatsApp
Priti Kumari
11y
4.5
k
0
0
25
Blog
Write this query and get table name append with current date
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 :
People also reading
Membership not found