I have a table with 2 int type columns: one auto increment and primary, while the other is just not null.
now, whenever a record is inserted into the tale, the first auto-increment column gets a unique and new id. What I want is that this new ID value to be also inserted to the other column, in the same insert statement.
How can a achieve this? Plz help…
thnx in advance 🙂
I do not understand why you need in this? However, you can create the second column also with autoincrement (but you should check if the values in these two columns are the same). Moreover, you can create a trigger that will update the value of the second column after the insert (this is the best way, I guess).