Db2

 View Only
  • 1.  column specification

    Posted Fri August 26, 2022 12:00 PM
    I have a table with a column :
    "T_MODIFIED_ON" TIMESTAMP NOT NULL GENERATED ALWAYS FOR EACH ROW ON UPDATE AS ROW CHANGE TIMESTAMP
    I did a select of all columns in sysibm.syscolumns and syscat.columns, but the information "for each row...." is not present. do you know where this is kept ? maybe in the tabledescriptor ?
    the column text keeps the option in case of always as ....


    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------

    #Db2


  • 2.  RE: column specification

    Posted Sat August 27, 2022 03:24 AM
    sorry for duplicate
    ok there is a column rowchange.. in catalog that keeps Y/N

    but for a reason I need to reload the table, but with generated always it can not. i could drop the generated, but can not reset it later, it is not allowed/supported with alter table alter column, only with add column. in that case we have the same, but loose the old data. I do not see any possible scenario to recover the data and have the same structure as before. or do you have any idea ?


    ------------------------------
    Thanks for all answers
    Best Regards,
    Guy Przytula
    ------------------------------