I would like to know if there\'s a way to add a column to an SQL Server table after it\'s created and in a specific position??
Thanks.
With Sql Server Management Studio you can open the table in design and drag and drop the column wherever you want
The only safe way of doing that is creating a new table (with the column where you want it), migrating the data, dropping the original table, and renaming the new table to the original name.
This is what Management Studio does for you when you insert columns.
The safest way to do this is.
In databases table columns don't have order.
Write proper select statement and create a view
In addition to all the other responses, remember that you can reorder and rename columns in VIEWs. So, if you find it necessary to store the data in one format but present it in another, you can simply add the column on to the end of the table and create a single table view that reorders and renames the columns you want to show. In almost every circumstance, this view will behave exactly like the original table.
You can do that in Management-Studio. You can examine the way this is accomplished by generating the SQL-script BEFORE saving the change. Basically it's achieved by: