The only thing which you then need is to rename the indexes (if required).
profile_cur has 19 columns and has 1-2 million rows.
I can not do a one hit update outside of the cursor loop.
FOR profile_rec IN profile_cur LOOP Quo To Pur Days( profile_rec.personid , profile_rec. IF changed Flag = TRUE THEN UPDATE profile SET quotopurdays = profile_rec. WHERE personid = profile_rec.personid; changed Flag := FALSE; END IF; END LOOP; I tried to use the CURSOR loop to populate a PL table of profile People_rec.
I tried to use this PL table of records to so a FORALL update etc..
In this situation you should flag the new question as a duplicate, rather than copying an answer.
However, now this question has received far more attention (and is better written and easier to find), so I've flagged your older question as a dupe of this.
This will not copy indexes and triggers as the SELECT result is an (unnamed) temporary table and does not "carry" the metadata of the source table.
Consider if you'd be using functions, it would make no sense.
I found the same situation and the approach which I took was as follows: 1.
Execute SHOW CREATE TABLE : This will give you the Create Table syntax for the table which you want to clone 2.
Run the CREATE TABLE query by changing the table name to clone the table.
This will create exact replica of the table which you want to clone along with Indexes.