Home > database > How to solve the insert information, ID repeat result in an error problem?
How to solve the insert information, ID repeat result in an error problem?
Time:01-21
Is like that, I need from A, B, C three different table, according to the demand to insert data into the "data backup table, no problem, when writing their own select statement at the beginning start insert after we have A problem, 'data backup table', 'id' is the only non-empty primary keys, and that A few tables respective to the the backup list 'id' import not line, the guide into the normal, because will be imported after the 'id' repeat an error,
The 'id' I should be how to processing? Can directly use in the insert statement, or can only use the stored procedure to solve it? (id is 123, this feeling is automatically generated)
PS : A, B, C tables and 'data backup tables are the customer's table, so you can't move the table structure, A few tables
CodePudding user response:
A new field in the bai, an id is set to the backup table primary key id, an id is set to the id used to store the customer table id
CodePudding user response:
I think a \ b \ c three tables of id, cannot be inserted into the table inside the primary key of the data backup id, should be a backup in the table there is a special store other table primary key field, if not then this a backup list, storing three tables of data, the design is not reasonable