in reply to Finding column info from Oracle tables

Information about tables -- including their column names -- can be accessed by using the DESCRIBE command. Your SQL would look like this:

DESCRIBE name_of_the_table;

When using Oracle, you can also find information about a table by querying the USER_TAB_COLUMNS.

I hope that's vaguely in the ballpark of what you need.

emc

Any New York City or Connecticut area jobs? I'm currently unemployed.

There are some enterprises in which a careful disorderliness is the true method.

—Herman Melville

Replies are listed 'Best First'.
Re^2: Finding column info from Oracle tables
by ronniec (Sexton) on Jul 05, 2007 at 10:16 UTC
    I've tried using "DESCRIBE USER\$" in a prepare statement and though it seems to "prepare" okay it fails on execution. Full error is "Can't execute SQL statement :: ORA-00900: invalid SQL statement (DBD ERROR: OCIStmtExecute)". I thought that would work but as it didn't I was hoping that I had the wrong syntax. Thanks anyway.
      Try this:
      select column_name,data_type from user_tab_columns where table_name='<your tablename>'