查询表信息
功能
查询表的列信息,包括列名、是否为空和列类型。
关键字
DESC
用法
DESC 表名
示例
sql
DESC txn_proc_result;
Column_Name NULL Data_Type
------------------------------------------------------------------------------
ACTIVITY_CODE | NOT NULL | CHAR(8)
REQ_SYS | NOT NULL | CHAR(4)
REQ_DATE | NOT NULL | CHAR(8)
UPAY_BIZ_SEQ | | CHAR(32)
REQ_TRANS_ID | NOT NULL | CHAR(32)
SESSION_ID | | CHAR(128)
REQ_DATE_TIME | NOT NULL | CHAR(17)
ACTION_CODE | NOT NULL | CHAR(1)
RCV_SYS | NOT NULL | CHAR(4)
RCV_DATE | | CHAR(8)
RCV_TRANS_ID | | CHAR(32)
RCV_DATE_TIME | | CHAR(17)
MER_ID | NOT NULL | CHAR(32)
VAS_TYPE | NOT NULL | CHAR(1)
PAY_TYPE | NOT NULL | CHAR(32)
AMOUNT | NOT NULL | NUMERIC(32,0)
HOME_PROV | NOT NULL | CHAR(3)
CHARGE_NUMBER | NOT NULL | CHAR(32)
TRADE_SEQNO | NOT NULL | CHAR(32)
TRADE_SESSION | NOT NULL | CHAR(32)
OLD_TRADE_SESSION | | CHAR(32)
SETTLE_DATE | NOT NULL | CHAR(8)
TRADE_TIME | NOT NULL | CHAR(14)
OLD_SETTLE_DATE | | CHAR(8)
OLD_TRADE_TIME | | CHAR(14)
SP_CODE | NOT NULL | CHAR(64)
SERVICE_CODE | NOT NULL | CHAR(24)
BAL_PROP | NOT NULL | NUMERIC(32,0)
BILL_FLAG | NOT NULL | CHAR(1)
CONTENT_ID | NOT NULL | CHAR(32)
POINT_COST | | NUMERIC(32,0)
VISIT_PROV | | CHAR(3)
DEPOSIT_TYPE | | CHAR(4)
APPLY_TIME | | CHAR(14)
FINISH_TIME | | CHAR(14)
READ_CONTENT_TYPE | | CHAR(4)
MSISDN_REC | | CHAR(11)
DURATION | | NUMERIC(32,0)
BYTE_SIZE | | NUMERIC(32,0)
MEMBER_TYPE | NOT NULL | CHAR(1)
CP_CODE | | CHAR(30)
USER_TYPE | | CHAR(1)
CRM_RESULT_CODE | | CHAR(32)
RESULT_CODE | | CHAR(6)
RESULT_DESC | | CHAR(256)
NOTIFY_TYPE | | CHAR(2)
CENTREID | | CHAR(4)