Friday, August 24, 2007

SQL: using rownum to make new primary keys for insert

INSERT INTO DEVICE

SELECT 1002403148+ROWNUM, DEVICE_TYPE_ID, 11, DISPLAY_NAME, SORT_ORDER FROM DEVICE;


the old uids stopped at 1002403148 and i needed to reinsert everything from the same table but changing one column value.

No comments:

Post a Comment