Home > Archive > MS SQL Server > October 2006 > When was primary key created for table structure?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author When was primary key created for table structure?
Patricia

2006-10-24, 6:29 pm

SQL Server 2000 SP3 - Where can I view the timestamp for a primary key
that was added to a table structure?

Roy Harvey

2006-10-24, 6:29 pm

On 18 Sep 2006 08:05:11 -0700, "Patricia"
< parrispatricia@russe
llcorp.com> wrote:

>SQL Server 2000 SP3 - Where can I view the timestamp for a primary key
>that was added to a table structure?


This should get you started:

select crdate, name
from sysobjects
where xtype = 'PK'

Roy Harvey
Beacon Falls, CT
Sue Hoegemeier

2006-10-24, 6:29 pm

You can query sysobjects for create dates - it's the crdate
column and Primary Keys have a xtype = 'PK' - something
along the lines of:
SELECT name, crdate
FROM sysobjects
WHERE xtype = 'PK'

On 18 Sep 2006 08:05:11 -0700, "Patricia"
< parrispatricia@russe
llcorp.com> wrote:

>SQL Server 2000 SP3 - Where can I view the timestamp for a primary key
>that was added to a table structure?


Patricia

2006-10-24, 6:29 pm


Roy Harvey wrote:
> On 18 Sep 2006 08:05:11 -0700, "Patricia"
> < parrispatricia@russe
llcorp.com> wrote:
>
>
> This should get you started:
>
> select crdate, name
> from sysobjects
> where xtype = 'PK'
>
> Roy Harvey
> Beacon Falls, CT



That got what I needed. Thanks so much for your quick reply.

Patricia

2006-10-24, 6:29 pm


Sue Hoegemeier wrote:[color=darkred
]
> You can query sysobjects for create dates - it's the crdate
> column and Primary Keys have a xtype = 'PK' - something
> along the lines of:
> SELECT name, crdate
> FROM sysobjects
> WHERE xtype = 'PK'
>
> On 18 Sep 2006 08:05:11 -0700, "Patricia"
> < parrispatricia@russe
llcorp.com> wrote:
>


Thank you so much!!!

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2009 droptable.com