SQL Server table creation date query

How can I get the creation date of the MS SQL table table using SQL query?
I could not see any table physically, but I can query this specific table.

+81
sql sql-server tsql sql-server-2005
Jul 23 '09 at 11:03
source share
5 answers

In 2005 you can use

SELECT [name] ,create_date ,modify_date FROM sys.tables 

I think that in 2000 you should include an audit.

+121
Jul 23 '09 at 11:06
source share

For SQL Server 2005 up:

 SELECT [name] AS [TableName], [create_date] AS [CreatedDate] FROM sys.tables 

For SQL Server 2000 up:

 SELECT so.[name] AS [TableName], so.[crdate] AS [CreatedDate] FROM INFORMATION_SCHEMA.TABLES AS it, sysobjects AS so WHERE it.[TABLE_NAME] = so.[name] 
+29
Jul 23 '09 at 11:44
source share
 SELECT create_date FROM sys.tables WHERE name='YourTableName' 
+14
Jul 23 '09 at 11:06
source share

For SQL Server 2000:

 SELECT su.name,so.name,so.crdate,* FROM sysobjects so JOIN sysusers su ON so.uid = su.uid WHERE xtype='U' ORDER BY so.name 
+4
Mar 22 '11 at 16:37
source share

If you also need a circuit:

 SELECT CONCAT(ic.TABLE_SCHEMA, '.', st.name) as TableName ,st.create_date ,st.modify_date FROM sys.tables st JOIN INFORMATION_SCHEMA.COLUMNS ic ON ic.TABLE_NAME = st.name GROUP BY ic.TABLE_SCHEMA, st.name, st.create_date, st.modify_date ORDER BY st.create_date 
+3
May 29 '18 at 18:24
source share



All Articles