mysql查看表字段類型的示例代碼:
select column_name,column_comment,data_typefrom information_schema.columnswhere table_name='查詢表名稱' and table_schema='數據庫名稱'
from information_schema.columns
where table_name='查詢表名稱' and table_schema='數據庫名稱'
查詢結果顯示方法:
desc 表名;show columns from 表名;describe 表名;sql語句顯示方法:show create table 表名;
show columns from 表名;
describe 表名;
sql語句顯示方法:
show create table 表名;