Timeline for Oracle: why does this DDL yield a different result in production (reordering of columns)?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 1, 2022 at 17:50 | comment | added | mustaccio |
Why do you expect alter table to modify columns in any deterministic order? You shouldn't really rely on a side effect of making columns invisible and visible. The only reliable approach would be to re-create the table with the desired order of columns. If your customer want a silly thing, they should pay the price (and so should you, for not convincing them otherwise).
|
|
Jul 1, 2022 at 16:11 | comment | added | Dave | This was my first guess as well. But we reverted the database to a snapshot which was taken before the script was run and the order was correct before. Also we tried the same script again to rule out weird runtime behaviors, but the result was the same. Also we manually executed the select statement from my sp_set_column_position procedure in production. This also resulted in the expected column list and order. | |
Jul 1, 2022 at 15:40 | comment | added | Balazs Papp |
Unable to reproduce, column order is correct. Maybe the original column order was id,a,b,c,e,f,d .
|
|
Jul 1, 2022 at 15:30 | history | asked | Dave | CC BY-SA 4.0 |