mysql查看錶結構方法整理,mysql查看錶結構

來源:互聯網
上載者:User

mysql查看錶結構方法整理,mysql查看錶結構

在Mysql的shell命令列下查詢表的結構:

1.desc(描述)命令

desc tablename;
describe tablename;
2.show命令
show columns from tablename;
show create table tablename
3.select命令(SQL語句)
#查看錶中所有列的資訊
use information_schema;
select column_name from columns where table_name='table_name';
#查看所有列的資訊

select column_name from columns where table_name='table_name';

--未完待續

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.