let's assume have table 'a' holds client's orders - updated within every second - , want copy every record of , put in new table 'b'.
how manage knowing every moment new records added/updated , cant 'copy + paste' (cause in moment new records added/updated) ? know way ?
please try:
create trigger trigger_insertitemdetails on tablea insert begin insert tableb ( colb1, colb2, colb3 ) select cola1, cola2, cola3 inserted end
and make sure inserting not null value column primary column of table. similary created update , delete action . don't need take copy seprately bcuz action happen in tablea affect tableb also.
Comments
Post a Comment