Wednesday, March 20, 2013

MSSQL: Get schema owner of database tables

To retrieve a list of schema owner of database tables, try the following code snippet. Hope it help.s

SELECT t.object_id AS 'TableID', t.name AS 'TableName', s.schema_id AS 'SchemaID', s.name AS 'SchemaOwner'
FROM sys.tables t inner join sys.schemas s ON t.schema_id = s.schema_id
ORDER by t.name

1 comment:

  1. Choose your favorite image from your device gallery or capture the real picture with your smartphone camera to create a drawing photo sketch & pencil sketch photo editor & set some stylish color drawing effect and sparkle effect. When you make a beautiful pencil sketch of your image then you feel it’s the best photo sketch - convert photo to sketch app and sparkle effect in the world.

    ReplyDelete

Do provide your constructive comment. I appreciate that.