Create a duplicate table in MS SQLFriday, February 6th, 2009

Articles, Databases

Ever wanted to replicate a table and its contents in MS SQL?

heres how:

SELECT * INTO NewTable FROM OldTable

Want to copy just the structure and not the content?

SELECT TOP 0 * INTO NewTable from OldTable

Like it? Share it!

Tagged with:

Amit Thakrar

Amit is a web designer and developer with a passion for design, interaction and usability. In his free time if he's not at the gym he's traveling the world.

View all posts by: Amit Thakrar

Follow us on Google+

Feedback (4)

Leave a Comment
  1. David says:

    Thanks alot. It worked for me

  2. Sundhas says:

    It doesnt work at my end 🙁
    It says : Sysntax error : INTO clause is not allowed
    what to do?

  3. Sergio says:

    🙂 It works! Thank you. I love this kind of tip.


Leave a Comment

You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>