Primary key
Posted in 1999
Topics: General Discussion
Hello , I would like to know how to find out the primary key of a table using a script. I want to find it out for about 175 tables and then compare their primary keys for duplicates using a script Thank you . bhaskar
You can export the db schema (dbschema > schema1.txt) and do a grep on
the file to locate primary keys. Or you can query the system tables;
refer to manual for which system table maintains PK info.
In article <7hrdaf$cl5$1@news.xmission.com>,
GIRISH MOHAN KADIVAL <girish.kadival@tatainfotech.com> wrote:
>
> Hello ,
> I would like to know how to find out the primary key
> of a table using a script.
> I want to find it out for about 175 tables
> and then compare their primary keys for duplicates
> using a script
> Thank you .
> bhaskar
>
>
--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---