I have a Table with 5 fields. among 5 columns one is PK. my reqt is i need to get rows based on some column(non duplicated but not PK) and for all returned results i need to assign new PK and save.
If i have 10 records in my table. if i get 10 records based on certain column. i need to asssign new PK for all 10 records and save. Finally there will be 20 records in the table. is there any single SQL query which does this operation?
Thanks!
IF col1 is PK (for autoincrement column)