1. 程式人生 > >mysql命令列查看錶結構,欄位等資訊

mysql命令列查看錶結構,欄位等資訊

mysql查看錶結構命令,如下:


desc 表名;
show columns from 表名;
describe 表名;
show create table 表名;


use information_schema
select * from columns where table_name='表名';


順便記下:
show databases;
use 資料庫名;

show tables;

然後查看錶裡面的資料

select * from 表名;



建立資料庫
create database abc;