Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: How to add and populate a new column?

Re: How to add and populate a new column?

From: Chakravarthy KM Nalamotu <kittu_at_Hawaii.Edu>
Date: 1996/12/10
Message-ID: <58jofv$eeg@news.Hawaii.Edu>#1/1

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US