Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Update table.
Kenneth Osenbroch wrote:
> Table A : Column A | Column B
> . | .
> Value 4 | Value 5
> Value 6 | Value 7
> Value 8 | Value 9
> . | .
>
> I need to uptdate Table A to become:
>
> Table A : Column A | Column B
> . | Value 4
> Value 4 | Value 6
> Value 6 | Value 8
> Value 8 | .
Only possible I think if you have some unique and sequential row identifier. Let's pretend that COLUMN C is a sequence number that numbers the rows in the correct sequence, with an increment of one, e.g.
Table A : Column A | Column B | Column C . | . | 1 Value 4 | Value 5 | 2 Value 6 | Value 7 | 3 Value 8 | Value 9 | 4 . | . | 5
You are now able to join row 2 with 1, 3 with 2, and so on, e.g.
SELECT
*
FROM table t1,
table t2
WHERE t1.column_c = (t2.column_c+1)
However, without a column like C, you are not able to relate the a row to its successor or predecessor.
Is there a way that you can add a column C to the table?
-- BillyReceived on Wed Sep 18 2002 - 08:23:31 CDT