I have table TAB_A
COL_NAME DATATYPE MAX_LENGTH
A VARCHAR 255
B INT 4
C FLOAT 8
I want to create A,B,C as column in TAB_B with DATATYPE and MAX_LENGTH.
The TAB_B columns look like this: Before
X Y Z
I want the TAB_B look like this: After
X Y Z A B C
with datatype.
How can I write dynamic SQL so my A,B,C,... columns will get created in existing table.