Skip to content

Instantly share code, notes, and snippets.

@zommarin
Forked from shbaz/gist:1188041
Created September 23, 2011 05:33
Show Gist options
  • Save zommarin/1236805 to your computer and use it in GitHub Desktop.
Save zommarin/1236805 to your computer and use it in GitHub Desktop.
All objects not in dbo or sys schema
SELECT s.name, o.name, o.type, o.type_desc, s.schema_id
FROM sys.objects AS o
INNER JOIN sys.schemas AS s ON o.schema_id = s.schema_id
WHERE s.name NOT IN ( 'dbo', 'sys' )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment