Discovery of unique constraints using Catalog Methods
From: Todd Hepler (thepler_at_watson.wustl.edu)
Date: 02/08/05
- Next message: fjlagos_at_vtr.net: "i need help"
- Previous message: Juan Jose Natera: "Re: NLS issues if using DBD::Oracle from mod_perl2"
- Next in thread: Chris Sarnowski: "Re: Discovery of unique constraints using Catalog Methods"
- Reply: Chris Sarnowski: "Re: Discovery of unique constraints using Catalog Methods"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 08 Feb 2005 15:54:58 -0600 To: dbi-users@perl.org
Is there DBD independent way to find the unique constraints for a table?
None of the Catalog Methods seem to do the trick. foreign_key_info()
presumably could find one only if another table uses it as a constraint.
I'm using Oracle, and I can write my own query, like:
select * from all_constraints
where constraint_type = 'U'
and table_name = ?
but I was hoping for a database independent way.
Thanks,
Todd
- Next message: fjlagos_at_vtr.net: "i need help"
- Previous message: Juan Jose Natera: "Re: NLS issues if using DBD::Oracle from mod_perl2"
- Next in thread: Chris Sarnowski: "Re: Discovery of unique constraints using Catalog Methods"
- Reply: Chris Sarnowski: "Re: Discovery of unique constraints using Catalog Methods"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]