dbTalk Databases Forums  

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

comp.databases.oracle comp.databases.oracle


Discuss how to make a column at column no X, a primary key in the comp.databases.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Prabodh
 
Posts: n/a

Default how to make a column at column no X, a primary key - 06-22-2004 , 03:37 AM






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

Reply With Quote
  #2  
Old   
Douglas Hawthorne
 
Posts: n/a

Default Re: how to make a column at column no X, a primary key - 06-22-2004 , 03:51 AM






"Prabodh" <prabodh_kelkar (AT) rediffmail (DOT) com> wrote

Quote:
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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.