sql - Quickly add a copy of a column to a MySQL table -


Let me quickly duplicate a DATETIME column in a table and give it a new name

My columns In my table named My Dates myResults, I need a query to create a new column in the table called NewDate, which has the exact data as myDate column.

Is it a faster way to do this than to approach a clear two-step approach to creating a new column, and then copying all the data (this is a large table and I have the fastest approach Looking for)?

The obvious solution:

  Add an optional table 'myResults' to 'newdate' DATETIME; Set up `MyResults`` new date '=` myDate`;  

The obvious solution is the only solution, unfortunately.

However, note that normally you should not copy a column to a relational database.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -