赞
踩
Oracle
- SELECT TB1.COLUMN_NAME,
- TB1.DATA_TYPE,
- TB1.DATA_LENGTH,
- TB1.DATA_PRECISION,
- TB1.DATA_SCALE,
- TB1.NULLABLE,
- TB1.DATA_DEFAULT,
- TB2.COMMENTS
- FROM USER_TAB_COLUMNS TB1, USER_COL_COMMENTS TB2
- WHERE TB1.TABLE_NAME = TB2.TABLE_NAME
- AND TB1.COLUMN_NAME = TB2.COLUMN_NAME
- AND TB1.TABLE_NAME = 'TEST'
MySql
- SELECT
- COLUMN_NAME AS '列名',
- COLUMN_COMMENT AS '注释',
- DATA_TYPE AS '字段类型',
- COLUMN_TYPE AS '长度加类型'
- FROM
- information_schema.`COLUMNS`
- WHERE
- TABLE_NAME LIKE 'TEST'
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。