SELECT colname1, colname2, colname5, colname4, colname3 into NewTableName from OldTableName
**this will create at NewTable with columns in the above sequence.
Correct. But although it will correctly copy the IDENTITY property and NULLability constraints if done on the same instance, it will not create some of the more important parts like the PK, AKs, FKs, Indexes, Triggers, etc, etc.
is pronounced ree-bar and is a Modenism for R
First step towards the paradigm shift of writing Set Based code: Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair
How to post code problemsHow to post performance problemsForum FAQs