Kashif Nizam Qureshi

Getting Last Created or Modified SQL Objects

Leave a comment

--=================== Tables ============================
-- Created
select name,type,type_desc, create_date From sys.objects where type ='U' order by create_date desc

-- Modified
select name,type,type_desc, modify_date From sys.objects where type ='U' order by modify_date desc


--=================== Procedures ============================
-- Created
select name,type,type_desc, create_date From sys.procedures order by create_date desc

-- Modified
select name,type,type_desc, modify_date From sys.procedures order by modify_date desc


--=================== Functions ============================
-- Created
select name,type,type_desc, create_date From sys.objects where --name like '%getde%'

type ='FN' or type ='TF' or type ='IF'

order by create_date desc

-- Modified
select name,type,type_desc, modify_date From sys.objects where

--name like '%getde%'

type ='FN' or type ='TF' or type ='IF'

order by modify_date desc

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s