|
Hi Aaron, You can perform SQL statements on the INFORMATION_SCHEMA table. So you can do a lookup like select CONSTRAINT_SCHEMA, TABLE_NAME, COLUMN_NAME from KEY_COLUMN_USAGE where CONSTRAINT_NAME = 'PRIMARY'; Or define the CONSTRAINT_SCHEMA to specify a DB. Cheers, Stig Aaron Cooper wrote, on 4/02/2009 2:39 PM:
--~--~---------~--~----~------------~-------~--~----~ NZ PHP Users Group: http://groups.google.com/group/nzphpug To post, send email to [email protected] To unsubscribe, send email to [email protected] -~----------~----~----~----~------~----~------~--~--- |
- [phpug] [OT] Get Primary Key column name using SQL Aaron Cooper
- [phpug] Re: [OT] Get Primary Key column name using SQL Paul Brouwers
- [phpug] Re: [OT] Get Primary Key column name using SQL Stig Manning
- [phpug] Re: [OT] Get Primary Key column name using... Aaron Cooper
- [phpug] Re: [OT] Get Primary Key column name u... Stig Manning
- [phpug] Re: [OT] Get Primary Key column name u... Keith Allpress
- [phpug] Re: [OT] Get Primary Key column name using SQL Mike Cochrane
