• 数据库字典查询,从EF工具操作中提取的


    用户表:

    SELECT  [Project1].[C1] AS [C1] ,
            [Project1].[CatalogName] AS [CatalogName] ,
            [Project1].[SchemaName] AS [SchemaName] ,
            [Project1].[Name] AS [Name]
    FROM    ( SELECT    [Extent1].[CatalogName] AS [CatalogName] ,
                        [Extent1].[SchemaName] AS [SchemaName] ,
                        [Extent1].[Name] AS [Name] ,
                        1 AS [C1]
              FROM      ( SELECT    QUOTENAME(TABLE_SCHEMA) + QUOTENAME(TABLE_NAME) [Id] ,
                                    TABLE_CATALOG [CatalogName] ,
                                    TABLE_SCHEMA [SchemaName] ,
                                    TABLE_NAME [Name]
                          FROM      INFORMATION_SCHEMA.TABLES
                          WHERE     TABLE_TYPE = 'BASE TABLE'
                        ) AS [Extent1]
            ) AS [Project1]
    ORDER BY [Project1].[SchemaName] ASC ,
            [Project1].[Name] ASC

    视图:

    SELECT  [Project1].[C1] AS [C1] ,
            [Project1].[CatalogName] AS [CatalogName] ,
            [Project1].[SchemaName] AS [SchemaName] ,
            [Project1].[Name] AS [Name]
    FROM    ( SELECT    [Extent1].[CatalogName] AS [CatalogName] ,
                        [Extent1].[SchemaName] AS [SchemaName] ,
                        [Extent1].[Name] AS [Name] ,
                        1 AS [C1]
              FROM      ( SELECT    QUOTENAME(TABLE_SCHEMA) + QUOTENAME(TABLE_NAME) [Id] ,
                                    TABLE_CATALOG [CatalogName] ,
                                    TABLE_SCHEMA [SchemaName] ,
                                    TABLE_NAME [Name] ,
                                    VIEW_DEFINITION [ViewDefinition] ,
                                    CAST(CASE IS_UPDATABLE
                                           WHEN 'YES' THEN 1
                                           WHEN 'NO' THEN 0
                                           ELSE 0
                                         END AS BIT) [IsUpdatable]
                          FROM      INFORMATION_SCHEMA.VIEWS
                          WHERE     NOT ( TABLE_SCHEMA = 'dbo'
                                          AND TABLE_NAME IN ( 'syssegments',
                                                              'sysconstraints' )
                                          AND SUBSTRING(CAST(SERVERPROPERTY('productversion') AS VARCHAR(20)),
                                                        1, 1) = 8
                                        )
                        ) AS [Extent1]
            ) AS [Project1]
    ORDER BY [Project1].[SchemaName] ASC ,
            [Project1].[Name] ASC   

  • 相关阅读:
    EUI组件之DataGroup
    EUI组件之CheckBox
    EUI组件之Button
    EUI组件之BitmapLabel 位图字体
    微信小游戏 egret.getDefinitionByName获取不到
    微信小游戏横屏设置
    本地 win7 与虚拟机Centos7 ping互通和Centos7 上网设置
    Centos7没有ETH0网卡
    Parallels Desktop Centos 设置IP
    2.用Python套用Excel模板,一键完成原亮样式
  • 原文地址:https://www.cnblogs.com/wanghaibin/p/4859529.html
Copyright © 2020-2023  润新知