Re: how to make a column at column no X, a primary key

From: Douglas Hawthorne <douglashawthorne_at_yahoo.com.au>
Date: Tue, 22 Jun 2004 08:51:28 GMT
Message-ID: <kqSBc.49360$sj4.24957_at_news-server.bigpond.net.au>


"Prabodh" <prabodh_kelkar_at_rediffmail.com> wrote in message news:c595dbe9.0406220037.36f00311_at_posting.google.com...
> Hi All,
>
> Do u know how to make 22nd column a primary key if there is a table of
> 100 columns and you don't know the names of the columns?
>
> If u do know plz reply ASAP.
>
> Prabodh

Pradodh,

The DESCRIBE command in SQL*Plus tells you the names of the columns for a table.

You can also use the data dictionary view, USER_TAB_COLUMNS, to find the name of the 22nd column of a table. Use the COLUMN_ID column of that view to find the order that the column was created in.

Douglas Hawthorne Received on Tue Jun 22 2004 - 10:51:28 CEST

Original text of this message