Timestamp and Adding a column !

  • Hi Friends,

    I have timestamp columns on my sql server tables. If I need to add a new column to a table, do I have to drop and recreate the TIMESTAMP column.

    Thanks

    -Mk.

  • No. You can alter the table structure without affecting the timestamp columns.

  • Or you can use EM to alter your table and insert your new column where you want if you want to keep the timestamp column at the end.

    Bye

    Gabor



    Bye
    Gabor

  • To mention, I seem to recall noticing that if you add a column via ALTER TABLE to a table with a timestamp column, the existing timestamp values for all current rows is not updated--even though the data in the row has been modified by the addition of the new column. (This may not apply if done through EM, as that will usually create a new table and copy the data over.) You might want to check this over in case you want your data to reflect the fact that new data has been added.

    Philip

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply