I have an 80 coluimn table with lots of records and the Primary key is a column named OrderNum (and is NOT an identity field). I need to insert a new record with all identitical values as an existing record based on the OrderNum, except obviously the OrderNum can't be the same, so I need to assign the newly inserted OrderNum.
What would be the best SQL statement to accomplish this?
Let's say the record I need to copy is OrderNum=100500
and I need to assign the new record Ordernum=101880
Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.
PL/SQL can be a very powerful tool for working directly with database tables. Being able to loop will allow you to perform more complex operations, but can be a little tricky to write correctly. This article will provide examples of basic loops alon…