How do I obtain a list of all schemas in a Sql Server database

前端 未结 6 1252
温柔的废话
温柔的废话 2020-12-13 11:54

I want to retrieve a list of all schemas in a given Sql Server database. Using the ADO.NET schema retrieval API I get a list of all collections but there is no

6条回答
  •  佛祖请我去吃肉
    2020-12-13 12:45

    SELECT s.name + '.' + ao.name
           , s.name
    FROM sys.all_objects ao
    INNER JOIN sys.schemas s ON s.schema_id = ao.schema_id
    WHERE ao.type='u';
    

提交回复
热议问题