通过sql语句导出表结构 SELECT 表名 Then D.name Else '' End, 表说明 Then isnull(F.value,'') Else '' End, 字段序号 = A.colorder, 字段名 = A.name, 字段说明 = isnull(G.[value],''), 标识 Then '√'Else '' End, 主键 FROM sysobjects Where xtype='PK' and parent_obj=A.id and name in ( SELEC
------导出表结构语句1.执行以下查询 SELECT 表名 = case when a.colorder=1 then d.name else '' end, 表说明 = case when a.colorder=1 then isnull(f.value,'') else '' end, 字段序号 = a.colorder, 字段名 = a.name, 标识 = case when COLUMNPROPERTY( a
SQL 导出表结构到Excel SELECT 表名 then d.name else '' end, 表说明 then isnull(f.value,'') else '' end, 字段序号 = a.colorder, 字段名 = a.name, 标识 then '√'else '' end, 主键 FROM sysobjects where xtype='PK' and parent_obj=a.id and name in ( SELECT name FROM sysindexes WHE
导出表结构到Excel ,统一维护,生成代码用 SELECT C.TABLE_NAME,CC.COMMENTS,C.COLUMN_NAME,C.DATA_TYPE, CASE WHEN C.DATA_TYPE='NUMBER' THEN C.DATA_PRECISION ELSE C.CHAR_LENGTH END AS DATA_LENGTH ,C.DATA_SCALE, C.NULLABLE FROM USER_TAB_COLUMNS C LEFT JOIN USER_COL_COMMENT