1 PowerDesigner中在生成的数据库脚本中用name列替换comment列作为字段描述的方法如下, 依次打开Tools -- Execute Commands -- Run Script,运行以下脚本: Option Explicit ValidationMode = True InteractiveMode = im_Batch Dim mdl 'the current model 'get the current active model Set mdl = ActiveModel
-- 创建表 create table SX04_LBALANCE ( YEAR VARCHAR2(10) not null, PROGRAMNO VARCHAR2(40) not null, FDATE VARCHAR2(10) not null, FACCTCODE VARCHAR2(50) not null, FCURCODE VARCHAR2(3) not null, FAACCCREDIT NUMBER(19,4) default 0 not null, FAENDBAL NUMBER
查询字段描述sql SELECT 'comment on column ' || n.nspname ||'.'|| c.relname || '.' || a.attname ||' is '''|| col_description(a.attrelid,a.attnum) ||''';' FROM pg_class as c join pg_attribute as a on a.attrelid = c.oid join pg_namespace n on c.relnamespace=n
本文导读:在MYSQL中使用GROUP BY分组时,我们可以select 多个非聚合字段,但是这些字段不在GROUP BY中,这样的SQL查询在SQL SERVER.ORACLE中是不合理的,且会报错,MYSQL的这种特异性,有时查询出来的结果并不是我们需要的,那么,我们在使用时应该注意哪些呢? 一.下列语句在MySql中是合规的 select count(1),task_type,status from action where biz_date='20141014' group by sta
1.mysql查看表字段和字段描述 SELECT column_name, column_comment FROM information_schema.columns WHERE table_schema ='hsex_dev_2271' AND table_name = 'channel_trade_detail'; 结果:
可以自己查询系统表: SELECT o.name AS tableName, c.name AS columnName, p.[value] AS Description FROM sysproperties p INNER JOIN sysobjects o ON o.id = p.id INNER JOIN syscolumns c ON p.id = c.id AND p.smallid = c.colid WHERE (p.name = 'MS_Description') ORDER B
select (case then ddd.value else '' end ) as "表名(中文)" --如果表名相同就返回空 , (case then d.name else '' end ) as 表名 --如果表名相同就返回空 , (case then ddd.value else '' end ) as 表说明 --如果表名相同就返回空 , a.colorder as 字段序号 , a.name as 字段名 , (case then '√' else '' end )
原文地址:https://blog.csdn.net/changhong009/article/details/29587063 --快速查看表结构(比较全面的) SELECT CASE WHEN col.colorder = 1 THEN obj.name ELSE '' END AS 表名, col.colorder AS 序号 , col.name AS 列名 , ISNULL(ep.[value], '') AS 列说明 , t.name AS 数据类型 , col.length AS