jeudi 29 octobre 2015

how to get update records which is newly inserted only in sql?

i want to move data from old sql db to new sql db which are having same tables. but new table is having 100(assume) records and old db is having 1000 records. i inserted all records in new db but i got diffetent id's because this id is having identity in new db.

now my concern is how can i update new identity value for the foreigh key columns. the foreign key column is having duplicate in new db. i have to update foreign key column only for newly inserted records.

Aucun commentaire:

Enregistrer un commentaire