develooper Front page | perl.dbi.users | Postings from April 2008

fetching the primary key of a table

Thread Next
From:
jagdish eashwar
Date:
April 30, 2008 09:00
Subject:
fetching the primary key of a table
Hi,
When I use the following syntax with Oracle, I am able to retrieve the
primary key. But the same syntax doesn't seem to work with MySql.

@primary_key = $dbh->primary_key($catalog,$schema,$table);

With my Oracle database, this translates to:
@primary_key = $dbh->primary_key(undef,'JAGDATA_TRANSFER','ORIG');

With my MySql database, this translates to:
@primary_key = $dbh->primary_key(undef,'jagdata_transfer','orig');

What am I doing wrong?


Thread Next


Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About