/*[15:04:35][ 0 ms]*/ Set names 'utf8'
/*[15:04:35][ 0 ms]*/ set sql_mode=''
/*[15:04:35][ 47 ms]*/ use `indicator`
/*[15:04:35][ 0 ms]*/ show table status from `indicator` where engine is not NULL
/*[15:04:36][ 0 ms]*/ describe `indicator`.`des_indicator_reg`
/*[15:04:36][ 31 ms]*/ show index from `indicator`.`des_indicator_reg`
/*[15:04:46][ 0 ms]*/ show full fields from `indicator`.`des_indicator_reg`
/*[15:04:46][ 0 ms]*/ show keys from `indicator`.`des_indicator_reg`
/*[15:04:46][ 0 ms]*/ show create table `indicator`.`des_indicator_reg`
/*[15:04:56][ 0 ms]*/ show full fields from `indicator`.`des_indicator_reg`
/*[15:04:56][ 15 ms]*/ show keys from `indicator`.`des_indicator_reg`
/*[15:04:56][ 0 ms]*/ select * from `indicator`.`des_indicator_reg` limit 0, 50
/*[15:05:13][ 0 ms]*/ describe `indicator`.`des_indicator_reg`
/*[15:05:27][ 0 ms]*/ show full fields from `indicator`.`des_indicator_reg`
MySQL 查看表结构简单命令。一、简单描述表结构,字段类型desc tabl_name
显示表结构,字段类型,主键,是否为空等属性,但不显示外键。
二、查询表中列的注释信息
select * from information_schema.columns where table_schema = 'db' #表所在数据库
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)