Home > database >  How to achieve a record SQL replication
How to achieve a record SQL replication

Time:10-04

Database tables in order to put the order in the table a record copy to the order table, order_id actually primary key. How to do?

CodePudding user response:

copy order a record in a table to order table
To be honest, didn't see.

CodePudding user response:

At the same table, make a copy of a record, but the primary key (that is, the front said order_id) have to be regenerated.

CodePudding user response:

Insert into the order select usename (order fields in addition to the orderid) from the order where orderid=1
I test can but don't know if you want

CodePudding user response:

By pb program line copy please dw_1. RowsCopy (li_row li_row, Primary! Dw_1, li_row + 1, Primary!

CodePudding user response:

I want to insert when returning to the primary key ID, how should do?

CodePudding user response:

@ @ identity

CodePudding user response:

Don't say the detailed point

CodePudding user response:

Don't say the detailed point
  • Related