1. SHOW CHARACTER SET语法
2. SHOW COLLATION语法
3. SHOW COLUMNS语法
4. SHOW CREATE DATABASE语法
5. SHOW CREATE TABLE语法
6. SHOW DATABASES语法
7. SHOW ENGINE语法
8. SHOW ENGINES语法
9. SHOW ERRORS语法
10. SHOW GRANTS语法
11. SHOW INDEX语法
12. SHOW INNODB STATUS语法android音频框架
13. SHOW LOGS语法
14. SHOW OPEN TABLES语法medication
15. SHOW PRIVILEGES语法
2. SHOW COLLATION语法
3. SHOW COLUMNS语法
4. SHOW CREATE DATABASE语法
5. SHOW CREATE TABLE语法
6. SHOW DATABASES语法
7. SHOW ENGINE语法
8. SHOW ENGINES语法
9. SHOW ERRORS语法
10. SHOW GRANTS语法
11. SHOW INDEX语法
12. SHOW INNODB STATUS语法android音频框架
13. SHOW LOGS语法
14. SHOW OPEN TABLES语法medication
15. SHOW PRIVILEGES语法
16. SHOW PROCESSLIST语法
17. SHOW STATUS语法
18. SHOW TABLE STATUS语法
19. SHOW TABLES语法
20. SHOW TRIGGERS语法
21. SHOW VARIABLES语法
22. SHOW WARNINGS语法
17. SHOW STATUS语法
18. SHOW TABLE STATUS语法
19. SHOW TABLES语法
20. SHOW TRIGGERS语法
21. SHOW VARIABLES语法
22. SHOW WARNINGS语法
mysqlschema作用
SHOW CHARACTER SET语法
SHOW CHARACTER SET [LIKE 'pattern']
SHOW CHARACTER SET语句用于显示所有可用的字符集。该语句取一个自选的LIKE子句。该子句指示哪些字符集名称可以匹配。举例说明:
mysql> show character set like 'utf%';
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
Maxlen列显示用于存储一个字符的最大的字节数目。
SHOW COLLATION语法
SHOW COLLATION [LIKE 'pattern']
来自SHOW COLLATION的输出包括所有可用的字符集。该语句取一个自选的LIKE子句。该子句的pattern指示哪些整序名称可以匹配。举例说明:
mysql> show collation like 'utf8%';
+--------------------+---------+-----+---------+----------+---------+
| Collation | Charset | Id | Default | Compiled | Sortlen |
+--------------------+---------+-----+---------+----------+---------+
| utf8_general_ci | utf8 | 33 | Yes | Yes | 1 |
| utf8_bin | utf8 | 83 | | Yes | 1 |
| utf8_unicode_ci | utf8 | 192 | | Yes | 8 |
| utf8_icelandic_ci | utf8 | 193 | | Yes | 8 |
| utf8_latvian_ci | utf8 | 194 | | Yes | 8 |
| utf8_romanian_ci | utf8 | 195 | | Yes | 8 |
| utf8_slovenian_ci | utf8 | 196 | | Yes | 8 |
| utf8_polish_ci | utf8 | 197 | | Yes | 8 |
| utf8_estonian_ci | utf8 | 198 | | Yes | 8 |
| utf8_spanish_ci | utf8 | 199 | | Yes | 8 |
| utf8_swedish_ci | utf8 | 200 | | Yes | 8 |
+--------------------+---------+-----+---------+----------+---------+
| Collation | Charset | Id | Default | Compiled | Sortlen |
+--------------------+---------+-----+---------+----------+---------+
| utf8_general_ci | utf8 | 33 | Yes | Yes | 1 |
| utf8_bin | utf8 | 83 | | Yes | 1 |
| utf8_unicode_ci | utf8 | 192 | | Yes | 8 |
| utf8_icelandic_ci | utf8 | 193 | | Yes | 8 |
| utf8_latvian_ci | utf8 | 194 | | Yes | 8 |
| utf8_romanian_ci | utf8 | 195 | | Yes | 8 |
| utf8_slovenian_ci | utf8 | 196 | | Yes | 8 |
| utf8_polish_ci | utf8 | 197 | | Yes | 8 |
| utf8_estonian_ci | utf8 | 198 | | Yes | 8 |
| utf8_spanish_ci | utf8 | 199 | | Yes | 8 |
| utf8_swedish_ci | utf8 | 200 | | Yes | 8 |
| utf8_turkish_ci | utf8 | 201 | | Yes | 8 |
| utf8_czech_ci | utf8 | 202 | | Yes | 8 |
| utf8_danish_ci | utf8 | 203 | | Yes | 8 |
| utf8_lithuanian_ci | utf8 | 204 | | Yes | 8 |
| utf8_slovak_ci | utf8 | 205 | | Yes | 8 |
| utf8_spanish2_ci | utf8 | 206 | | Yes | 8 |
| utf8_roman_ci | utf8 | 207 | | Yes | 8 |
| utf8_persian_ci | utf8 | 208 | | Yes | 8 | 安装路径
| utf8_esperanto_ci | utf8 | 209 | | Yes | 8 |
| utf8_hungarian_ci | utf8 | 210 | | Yes | 8 |
+--------------------+---------+-----+---------+----------+---------+
| utf8_czech_ci | utf8 | 202 | | Yes | 8 |
| utf8_danish_ci | utf8 | 203 | | Yes | 8 |
| utf8_lithuanian_ci | utf8 | 204 | | Yes | 8 |
| utf8_slovak_ci | utf8 | 205 | | Yes | 8 |
| utf8_spanish2_ci | utf8 | 206 | | Yes | 8 |
| utf8_roman_ci | utf8 | 207 | | Yes | 8 |
| utf8_persian_ci | utf8 | 208 | | Yes | 8 | 安装路径
| utf8_esperanto_ci | utf8 | 209 | | Yes | 8 |
| utf8_hungarian_ci | utf8 | 210 | | Yes | 8 |
+--------------------+---------+-----+---------+----------+---------+
Default列指示对于其字符集,整序值是否是默认值。Compiled指示字符集是否被编辑到服务器中。Sortlen与对字符串(在字符集中表达)分类所需的存储器的数量有关。
SHOW COLUMNS语法
SHOW [FULL] COLUMNS FROM tbl_name [FROM db_name] [LIKE 'pattern']
SHOW COLUMNS显示在一个给定表中的各列的信息。对于试图,本语句也起作用。
mysql> show full columns from test_lan;
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------+-------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
c4d教程入门到精通| id | int(10) | NULL | NO | PRI | NULL | auto_increment | select,insert,upd
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+---------+-------------+-----------------+------+-----+---------+----------------+---------------------------------+---------+
c4d教程入门到精通| id | int(10) | NULL | NO | PRI | NULL | auto_increment | select,insert,upd
ate,references | |
| name | varchar(40) | utf8_general_ci | NO | | | | select,insert,update,references | ??? |
| value | text | utf8_general_ci | NO | | NULL | | select,insert,update,references | ???? |
| package | varchar(50) | utf8_general_ci | YES | MUL | NULL | | select,insert,update,references | |
| name | varchar(40) | utf8_general_ci | NO | | | | select,insert,update,references | ??? |
| value | text | utf8_general_ci | NO | | NULL | | select,insert,update,references | ???? |
| package | varchar(50) | utf8_general_ci | YES | MUL | NULL | | select,insert,update,references | |
full 参数的作用是列出权限列和备注列
SHOW CREATE DATABASE语法
SHOW CREATE {DATABASE | SCHEMA} db_name
显示用于创建给定数据库CREATE DATABASE语句。也可以使用SHOW CREATE SCHEMA。
mysql> show create database 5j;
+----------+-------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------+
| 5j | CREATE DATABASE `5j` |
+----------+-------------------------------------------------------------+
+----------+-------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------+
| 5j | CREATE DATABASE `5j` |
+----------+-------------------------------------------------------------+
mysql> show create schema 5j;
+----------+-------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------+
| 5j | CREATE DATABASE `5j` |
+----------+-------------------------------------------------------------+
+----------+-------------------------------------------------------------+
| Database | Create Database |
+----------+-------------------------------------------------------------+
| 5j | CREATE DATABASE `5j` |
+----------+-------------------------------------------------------------+
SHOW CREATE TABLE语法
SHOW CREATE TABLE tbl_name
显示用于创建给定表的CREATE TABLE语句。本语句对视图也起作用。
mysql> show create table last_ids;
CREATE TABLE `last_ids` (
`role_id` int(11) unsigned NOT NULL default '0' COMMENT '????ID',
`combat_id` bigint(20) unsigned NOT NULL default '0' COMMENT '????ID'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=REDUNDANT COMMENT='??ID?'
根据SQL_QUOTE_SHOW_CREATE选项,SHOW CREATE TABLE会对表名称和列名称加引号。
SHOW DATABASES语法
SHOW {DATABASES | SCHEMAS} [LIKE 'pattern'];
mysql> show schemas;
+--------------------+
| Database |
+--------------------+
| information_schema |
| 5j |
| mysql |
联想打印机replace toner清零| test |
| uniondb |
+--------------------+
+--------------------+
| Database |
+--------------------+
| information_schema |
| 5j |
| mysql |
联想打印机replace toner清零| test |
| uniondb |
+--------------------+
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| Database |
+--------------------+
| information_schema |
| 5j |
| mysql |
| test |
| uniondb |
+--------------------+
mysql> show databases like '5j';
+---------------+
| Database (5j) |
+---------------+
| 5j |
+---------------+
| information_schema |
| 5j |
| mysql |
| test |
| uniondb |
+--------------------+
mysql> show databases like '5j';
+---------------+
| Database (5j) |
+---------------+
| 5j |
+---------------+
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论