Creating /altering table at run time is not a good idea.
why not create the table before executing any insert.
i'm creating it like a temporary table. i have a drop statement after inserting values. the whole process is like this:
i have a table with data which i need to update/replace.
1. copy data from t1 to t2 (in case something goes wrong)
2. delete data from t1
3. create table t3 from xml (insert from xml)
4. update table t3 with values from another xml
5. copy data from t3 to t1
6. drop t3
edit: the reason i cannot create it is because i do not know the column names/types and number of columns untill i parse the xml