Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to find the date a table was created in SQL Server 2000

Status
Not open for further replies.

ckOne1976

Programmer
Apr 10, 2007
2
IE
Hi,

is there a TSQL function that will tell me the date a table was created? I have looked at all the SQL date functions and have not come accross anything suitable yet. I am using Microsoft SQL Server 2000.

Thanks
 
Check the crdate in the following query

select * from sysobjects
where xtype = 'U'

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
Try this...

Code:
[COLOR=blue]Select[/color] 	[COLOR=blue]Name[/color], crdate 
[COLOR=blue]From[/color] 	sysobjects 
[COLOR=blue]Where[/color] 	xtype = [COLOR=red]'U'[/color]
		And ObjectProperty(id, [COLOR=red]'IsTable'[/color]) = 1
[COLOR=blue]Order[/color] [COLOR=blue]By[/color] [COLOR=blue]name[/color]

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Thanks for that it worked. Would also like to be able to get the date when the table was last changed. Have not found anything suitable so far.
 
There is no alter date.

- Paul [batman]
- If at first you don't succeed, find out if the loser gets anything.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top