web建站教程
  1. 首页
  2. vuejs
  3. js
  4. 好玩
  5. seo教程
  6. 前端知识
  7. 百度echarts
  8. 更多
    php入门
    nodejs
    mockjs
    reactjs
    mysql
    wordpress
    织梦cms
    帝国cms
    git教程
    IT知识
    模板大全
    休息站

mysql介绍2种查询表字符集编码的方法

387 ℃
     

mysql介绍2种查询表字符集编码的方法。1、利用show columns语句配合full关键字查看当前数据库中指定表中所有列的字符集编码;2、利用show table status语句查看指定表的字符集编码。

1、利用show columns语句配合full关键字查看当前数据库中指定表中所有列的字符集编码

show full columns from 表名;
mysql> show full columns from 表名;
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type     | Collation       | Null | Key | Default | Extra | Privileges                      | Comment |
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
| id    | int(3)   | NULL            | NO   | PRI | NULL    |       | select,insert,update,references |         |
| name  | char(12) | utf8_general_ci | YES  |     | NULL    |       | select,insert,update,references |         |
| dorm  | char(10) | utf8_general_ci | YES  |     | NULL    |       | select,insert,update,references |         |
| addr  | char(12) | utf8_general_ci | YES  |     | 未知    |       | select,insert,update,references |         |
| score | int(3)   | NULL            | YES  |     | NULL    |       | select,insert,update,references |         |
+-------+----------+-----------------+------+-----+---------+-------+---------------------------------+---------+
5 rows in set (0.00 sec)

2、利用show table status语句查看指定表的字符集编码

show table status from 库名 like 表名;
mysql> show table status from 库名 like 表名;
+-----------+--------+---------+------------+------+----------------+-------------------------+-------------+------------+-----------------+----------+-
| Name      | Engine | Version | Row_format | Rows | Avg_row_length | Data_leate_time         | Update_time | Check_time | Collation       | Checksum | 
+-----------+--------+---------+------------+------+----------------+-------------------------+-------------+------------+-----------------+----------+-
| test_info | InnoDB |      10 | Compact    |   10 |           1638 |       17-12-05 19:01:55 | NULL        | NULL       | utf8_general_ci |     NULL | 
+-----------+--------+---------+------------+------+----------------+-------------------------+-------------+------------+-----------------+----------+-
1 row in set (0.00 sec)

利用PHP语法安全地处理MySQL中的0值

MySQL出现1171错误如何解决?

在MySQL中如何改变自动递增的起始数?

MySQL和SQLServer有什么区别?

MySQL如何使用数据库进行多租户部署

标签: mysql, 表字符集

上面是“mysql介绍2种查询表字符集编码的方法”的全面内容,想了解更多关于 mysql 内容,请继续关注web建站教程。

当前网址:https://ipkd.cn/webs_2237.html

声明:本站提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请发送到邮箱:admin@ipkd.cn,我们会在看到邮件的第一时间内为您处理!

当前位置: 网站首页 > mysql
本文共计1732个字,预计阅读时长12分钟
生活小工具,收录了80多款小工具
上一篇: 推荐2款充满科技感的艺术字体——小新黑体、小新潮酷体
下一篇: 推荐一款浏览器数据库的开源工具库——Dexie.js(JavaScript调用)
x 打工人ai神器