Monday, December 21, 2009

How to get the latest modified and crreated tables and columns and procedures in sql server

select name from sysobjects where xtype='u' and (CONVERT(NVARCHAR(10), cast(refdate as datetime), 101) like ('11/%/2009') or CONVERT(NVARCHAR(10), cast(refdate as datetime), 101) like ('12/%/2009'))
select name from sysobjects where xtype='p' and (CONVERT(NVARCHAR(10), cast(refdate as datetime), 101) like ('11/%/2009') or CONVERT(NVARCHAR(10), cast(refdate as datetime), 101) like ('10/%/2009')or CONVERT(NVARCHAR(10), cast(refdate as datetime), 101) like ('12/%/2009')) and name like 'spCM_%'

select CONVERT(NVARCHAR(10), cast(getdate() as datetime), 101)

No comments:

Post a Comment