Home » SQL & PL/SQL » SQL & PL/SQL » all_tab_columns distinct column_name
all_tab_columns distinct column_name [message #255980] Thu, 02 August 2007 10:54 Go to next message
SpyderDriver
Messages: 2
Registered: August 2007
Junior Member
Hello, I am trying to get a list of columns and data_types in one of my tables. The weird hting is I have columns listed that i don't see as a column in Enterprise Manager. I also get some columns repeated. I even tried using:

select distinct column_name, data_type, data_length, data_precision, data_scale from all_tab_columns where table_name = 'mytable' order by column_name

..but a few extra column_names show up along with a column that is listed twice.

Any ideas on how I can get only the columns listed in enterprise manager distinctly? Could the extra ones be old columns that were deleted?
Re: all_tab_columns distinct column_name [message #255981 is a reply to message #255980] Thu, 02 August 2007 11:04 Go to previous messageGo to next message
ammishra
Messages: 179
Registered: January 2007
Location: india
Senior Member
i think you should add the 'OWNER' column in your select statment .. you can create same name table in two diffrent schema.


--Yash

[mod-edit] removed illiterate IM words.

[Updated on: Thu, 02 August 2007 12:46] by Moderator

Report message to a moderator

Re: all_tab_columns distinct column_name [message #255995 is a reply to message #255980] Thu, 02 August 2007 12:52 Go to previous message
SpyderDriver
Messages: 2
Registered: August 2007
Junior Member
That seemed to do the trick.

Thanks.
Previous Topic: Displaying a Word/Excel document on the Web
Next Topic: Selecting Second Option
Goto Forum:
  


Current Time: Wed Dec 07 06:47:20 CST 2016

Total time taken to generate the page: 0.09472 seconds