Wednesday, March 18, 2009

CREATE a Copy of Existing table in Sql server

  • SELECT * INTO NewTable FROM OldTable
  • SELECT * INTO Database1.owner.NewTable FROM Database2.owner.OldTable
  • SELECT * INTO Database.owner1.NewTable FROM Database.owner2.OldTable
Related: Use query analyzer to Attach/Detach databases

No comments: