Skip to content

Instantly share code, notes, and snippets.

@ezhov-da
Last active March 10, 2019 12:14
Show Gist options
  • Save ezhov-da/d4db2e41c3c983708e1a9bc886baa661 to your computer and use it in GitHub Desktop.
Save ezhov-da/d4db2e41c3c983708e1a9bc886baa661 to your computer and use it in GitHub Desktop.
текст объектов
select
ROW_NUMBER() over(order by sc.object_id) rowId, sc.object_id as [id], so.name, sc.definition as [text]
into #temp
from sysobjects so
left join sys.sql_modules sc
on sc.object_id = so.id
where
so.xtype in ('V' ,'FN', 'p', 'IF','TR')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment