0
I need help. I have the table USUARIO
, where I have the columns LOGIN
, SENHA
but need to include the column called DATACRIACAO
, but I would like to know how to insert this column DATACRIACAO
after the column LOGIN
, I’m working with the Oracle 11g.
This command by default when inserting the column at the last position, however you need to insert it after the first existing column.
– Diogo dgo
In case I already have entered data, I would not have a way to do via command, I know that in mysql if using the command AFTER + {COLUMN} it insert after the column informed in the after, in oracle has nothing like ?
– Diogo dgo
I changed my answer with an interesting information that I found concerning changing the sequence of columns after already having data inserted in the table
– R.Santos
Do an Insert script (a program like sql Developer does automatico) , drop the table , recreate the table with the correct positions , runs the Insert script , but in my opinion a lot of work for nothing
– Motta
I believe there is no need as you commented @Motta because what will determine the return he will get is the
Select
what he does. If instead ofSelect *
it determine the order of the columnsSelect login, datacriacao, senha from usuario
the result comes out in the order he wants. What do you think?– R.Santos
It helped a lot this article, thanks R.santos, gave me a clear in what I need to do.
– Diogo dgo
Like I said I can do it but I don’t think it speaks for effort.
– Motta