Re: fetching the primary key of a table



On Wed, 2008-04-30 at 21:30 +0530, jagdish eashwar wrote:

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?

I use:
$dbh->column_info( undef, $schema, $table, '%' );

Dan
.



Relevant Pages

  • fetching the primary key of a table
    ... When I use the following syntax with Oracle, I am able to retrieve the ... But the same syntax doesn't seem to work with MySql. ... With my Oracle database, this translates to: ...
    (perl.dbi.users)
  • Re: OT: How I learned to stop worrying and love the RDBMS
    ... not used either to replace TurboIMAGE for a migration client. ... Oracle and DB2 to replace TurboIMAGE for migration clients and our partners ... MySQL has become. ... The primary reason for our Oracle, DB2 and MS SQL Server emphasis is because ...
    (comp.sys.hp.mpe)
  • Re: MySQLdb slow on MySQL 5
    ... Oracle bought a small Finnish ... company which developed the transaction-aware table- ... backend for MySQL. ... It's one thing if Oracle fails to comply to all standards, ...
    (comp.lang.python)
  • Re: Oracle vs MySql Performance
    ... Performance on MySql was adequate but as our primary DB platform is ... Oracle we influenced the 3rd part to introduce an Oracle version (NB: ... To facilitate this process the vendor has used almost pure ANSI Sql so ... Look at the wait events in the raw trace file for clues ...
    (comp.databases.oracle.server)
  • Re: Select count(*) in Oracle and MySQL
    ... The same query in Oracle takes about 6 minutes, ... The MySQL table has no primary key either. ... you either don't know how to use a DBMS like Oracle (given ...
    (comp.databases.oracle.server)