[EMAIL PROTECTED] wrote:
Good morning,

I was given some tables on an Oracle database, but unfortunately I do
not know the field/column names of the table. I've made numerous
attempts to print such a list for a given table, but they never seem
to work. I've been trying SQL queries such as:

SELECT column_name FROM user_tab_cols WHERE table_name =
'mytable'sname'

Sometimes I'm able to get them to run with no errors... yet no result
is produced when I try to print them. I'm not sure if there is some
trick with DBI that I'm overlooking. Any tips would be greatly
appreciated!

Cheers,
Kacey



If you only want the info about columns in a table have you tried:

$sth = $dbh->column_info( $catalog, $schema, $table, $column );

I would guess if you get no result, the where clause is not matching a table.

column_info is the portable way to do it.

Martin
--
Martin J. Evans
Easysoft Limited
http://www.easysoft.com

Reply via email to