Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: newbie-desc command
Originally posted by Sybrand Bakker
> "Me" wrote in message
> news:b1vccvgbffv5ro9n7qso72n8ilrhjfjdrm_at_4ax.com"]news:b1vccvgbf-
> fv5ro9n7qso72n8ilrhjfjdrm_at_4ax.com[/url]...
> > In Oracle SQL* Plus desc command give the information of a table
> but
> > how does one know which is the primary key?
> > I am sorry if this has been already asked and answered
> here.
> > Thanks in advance.
>
>
> By querying
> select constraint_name from user_constraints where table_name = '' and
> constraint_type = 'P'
>
> There is a reference manual with a full break down of all the
> dictionary
> views. Please use it, before you come boring and will be ignored.
>
>
> --
> Sybrand Bakker
> Senior Oracle DBA
>
> to reply remove '-verwijderdit' from my e-mail address
>
I fully endorse the idea that people should read the manuals and they
will learn a lot. However, we should remember that sometimes these
people are "newbies" as "Me" claims to be. How is a total newbie
expected to know that the way to find out the primary key of a table is
not via the DESC command (which shows SOME information about a table),
but by selecting from a set of views documented in the Oracle Database
Reference manual (not in the SQL reference manual for example?)
Sometimes people need a gentle nudge in the right direction!
-- Posted via http://dbforums.comReceived on Tue May 20 2003 - 10:35:11 CDT