Table Name: TABLE1
EMPLID NAME SEQUENCE_NUMBER
000071 Same Name 1
000071 Same Name 1
000071 Same Name 1
000071 Same Name 1
After executing SQL the data should be like this:
EMPLID NAME SEQUENCE_NUMBER
000071 Same Name 1001
000071 Same Name 1002
000071 Same Name 1003
000071 Same Name 1004
000071 Same Name 1001
000071 Same Name 1002
000071 Same Name 1003
000071 Same Name 1004
The tricky part is that, we can not select single row with any Where condition. Can you suggest any solution?
Answer: Is simple
UPDATE TABLE1 SET SEQUENCE_NUMBER = ROWNUM + 1000;
No comments:
Post a Comment