| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.oracle -> Re: how to make a column at column no X, a primary key
"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 - 03:51:28 CDT
![]() |
![]() |