Skip to content

Instantly share code, notes, and snippets.

@Nisden
Created April 8, 2014 14:13
Show Gist options
  • Save Nisden/10130554 to your computer and use it in GitHub Desktop.
Save Nisden/10130554 to your computer and use it in GitHub Desktop.
select sys.objects.name, sys.objects.type_desc, LEN(OBJECT_DEFINITION(object_id)) - LEN(REPLACE(OBJECT_DEFINITION(object_id), CHAR(13)+CHAR(10), ' ')) +1 as lines from sys.objects where is_ms_shipped = 0 AND OBJECT_DEFINITION(object_id) IS NOT NULL order by lines DESC
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment