Re: Need Help With Query

From: jgar the jorrible <joel-garry_at_home.com>
Date: Tue, 24 Feb 2009 17:26:42 -0800 (PST)
Message-ID: <7bd59e7e-bd25-4fde-8cbf-f887d5057a38_at_a12g2000yqm.googlegroups.com>



On Feb 24, 4:40 pm, Pete <shunpike..._at_yahoo.com> wrote:
> Hi,
>
> I am new to Oracle and I was wondering if someone could help me with a
> query.  Basically, what I want to know is how to return all the
> columns in a given table EXCLUDING the primary key column.
>
> Thanks In Advance,
>
> Pete

desc user_tab_columns to see what you can know about columns. constraint_type='P' in user_constraints to see what the primary key is.

It is entirely possible to have tables with no primary key.

Google on those views (also there are ALL and DBA instead of USER, with increasing amounts of privilege) to find example scripts. user_tab_columns means those in the schema, all_tab_columns means those the user can see. Object names tend to be capitalized unless quoted. More information is in the doc set, searchable at http://tahiti.oracle.com.

jg

--
_at_home.com is bogus.
http://weblog.infoworld.com/robertxcringely/archives/2009/02/wikileaks_sprin.html
Received on Tue Feb 24 2009 - 19:26:42 CST

Original text of this message