Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How to add and populate a new column?
You can add a column by using
ALTER TABLE customer ADD (rank NUMBER(x, y));
DO NOT use NOT NULL option.
You may want to write a stored procedure to populate the rank field.
Hope this helps.
Kittu.
Z. Martinez (zlm101_at_psu.edu) wrote:
: I need to add a new column, called rank, in a table called customers.
: The "rank" column depends on another column called quantity.
: So, the row that has the highest "quantity" value gets a "rank" value
: of 1, and the lowest quantity value gets the last rank.
: Can anybody tell me how to add the new column and populate it.
: Thank you for any information
: Please reply to zlm101_at_psu.edu
Received on Tue Dec 10 1996 - 00:00:00 CST