Re: Need Help With Query
Date: Tue, 24 Feb 2009 17:26:42 -0800 (PST)
On Feb 24, 4:40 pm, Pete <shunpike..._at_yahoo.com> wrote:
> 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,
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.
-- _at_home.com is bogus. http://weblog.infoworld.com/robertxcringely/archives/2009/02/wikileaks_sprin.htmlReceived on Tue Feb 24 2009 - 19:26:42 CST