select distinct CHARACTER_SET_NAME from CHARACTER_SETS limit 12 offset 30;
select distinct CHARACTER_SET_NAME from CHARACTER_SETS limit 30,12;

use information_schema
mysql> select * from CHARACTER_SETS;
+--------------------+----------------------+-----------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+-----------------------------+--------+
| big5 | big5_chinese_ci | Big5 Traditional Chinese | 2 |
| dec8 | dec8_swedish_ci | DEC West European | 1 |

完全限定(同时使用表明和列名):
注:CHARACTER_SETS表属于information_schema库

mysql> select CHARACTER_SETS.CHARACTER_SET_NAME from CHARACTER_SETS;
select CHARACTER_SETS.CHARACTER_SET_NAME from information_schema.CHARACTER_SETS;

order by排序:
mysql> select * from CHARACTER_SETS order by CHARACTER_SET_NAME;

多列排序
mysql> select * from CHARACTER_SETS order by MAXLEN,CHARACTER_SET_NAME;

降序:
mysql> select * from CHARACTER_SETS order by CHARACTER_SET_NAME desc;

多列降序
mysql> select * from CHARACTER_SETS order by MAXLEN desc,CHARACTER_SET_NAME desc;

mysql> select * from CHARACTER_SETS where MAXLEN between 2 and 4 order by CHARACTER_SET_NAME;
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME = 'binary';
mysql> select * from CHARACTER_SETS where MAXLEN = 1 order by CHARACTER_SET_NAME;
单引号用来限定字符串,如果将值和字符串的列进行比较,则需要限定引号,用来与数值列进行比较的值不用引号

空值检查
mysql> select * from CHARACTER_SETS where DESCRIPTION is null;

计算次序:and优先级大于or
mysql> select * from CHARACTER_SETS where MAXLEN = 4 or maxlen = 3 and character_set_name = 'utf32';
+--------------------+----------------------+----------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+----------------+--------+
| utf8mb4 | utf8mb4_general_ci | UTF-8 Unicode | 4 |
| utf16 | utf16_general_ci | UTF-16 Unicode | 4 |
| utf32 | utf32_general_ci | UTF-32 Unicode | 4 |
+--------------------+----------------------+----------------+--------+
3 rows in set (0.00 sec)

解决;用圆括号明确分组相应的操作符
mysql> select * from CHARACTER_SETS where (MAXLEN = 4 or maxlen = 3) and character_set_name = 'utf32';
+--------------------+----------------------+----------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+----------------+--------+
| utf32 | utf32_general_ci | UTF-32 Unicode | 4 |
+--------------------+----------------------+----------------+--------+
1 row in set (0.00 sec)

IN操作符用来指定条件范围
mysql> select * from CHARACTER_SETS where maxlen in (2,3) order by CHARACTER_SET_NAME;
+--------------------+----------------------+---------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+---------------------------+--------+
| big5 | big5_chinese_ci | Big5 Traditional Chinese | 2 |
| cp932 | cp932_japanese_ci | SJIS for Windows Japanese | 2 |
| eucjpms | eucjpms_japanese_ci | UJIS for Windows Japanese | 3 |
| euckr | euckr_korean_ci | EUC-KR Korean | 2 |
| gb2312 | gb2312_chinese_ci | GB2312 Simplified Chinese | 2 |
| gbk | gbk_chinese_ci | GBK Simplified Chinese | 2 |
| sjis | sjis_japanese_ci | Shift-JIS Japanese | 2 |
| ucs2 | ucs2_general_ci | UCS-2 Unicode | 2 |
| ujis | ujis_japanese_ci | EUC-JP Japanese | 3 |
| utf8 | utf8_general_ci | UTF-8 Unicode | 3 |
+--------------------+----------------------+---------------------------+--------+
10 rows in set (0.00 sec)

NOT操作符在where字句中有且只要一个功能,就是否定他之后跟的任何条件
mysql> select * from CHARACTER_SETS where maxlen not in (2,3) order by CHARACTER_SET_NAME;

通配符:
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME like 'cp%';
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME like 'Cp___';
(下划线只匹配一个字符,%匹配0个或多个字符)

正则表达式:regexp
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME regexp '125' order by CHARACTER_SET_NAME;
+--------------------+----------------------+--------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+--------------------------+--------+
| cp1250 | cp1250_general_ci | Windows Central European | 1 |
| cp1251 | cp1251_general_ci | Windows Cyrillic | 1 |
| cp1256 | cp1256_general_ci | Windows Arabic | 1 |
| cp1257 | cp1257_general_ci | Windows Baltic | 1 |
+--------------------+----------------------+--------------------------+--------+
4 rows in set (0.00 sec)

mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME regexp '1250';
+--------------------+----------------------+--------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+--------------------------+--------+
| cp1250 | cp1250_general_ci | Windows Central European | 1 |
+--------------------+----------------------+--------------------------+--------+
1 row in set (0.00 sec)

mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME like '1250';
Empty set (0.00 sec)

mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME like '%1250';
+--------------------+----------------------+--------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+--------------------------+--------+
| cp1250 | cp1250_general_ci | Windows Central European | 1 |
+--------------------+----------------------+--------------------------+--------+
1 row in set (0.00 sec)

binary用来区分大小写
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME regexp binary 'cp';
+--------------------+----------------------+---------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+---------------------------+--------+
| cp850 | cp850_general_ci | DOS West European | 1 |
| cp1250 | cp1250_general_ci | Windows Central European | 1 |
| cp866 | cp866_general_ci | DOS Russian | 1 |
| cp852 | cp852_general_ci | DOS Central European | 1 |
| cp1251 | cp1251_general_ci | Windows Cyrillic | 1 |
| cp1256 | cp1256_general_ci | Windows Arabic | 1 |
| cp1257 | cp1257_general_ci | Windows Baltic | 1 |
| cp932 | cp932_japanese_ci | SJIS for Windows Japanese | 2 |
+--------------------+----------------------+---------------------------+--------+
8 rows in set (0.00 sec)

mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME regexp binary 'Cp';
Empty set (0.00 sec

'|'是正则表达式的or操作符
mysql> select * from CHARACTER_SETS where CHARACTER_SET_NAME regexp binary 'cp850|cp852|cp932';
+--------------------+----------------------+---------------------------+--------+
| CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION | MAXLEN |
+--------------------+----------------------+---------------------------+--------+
| cp850 | cp850_general_ci | DOS West European | 1 |
| cp852 | cp852_general_ci | DOS Central European | 1 |
| cp932 | cp932_japanese_ci | SJIS for Windows Japanese | 2 |
+--------------------+----------------------+---------------------------+--------+
3 rows in set (0.00 sec)

mysql> select * from CHARACTER_SETS where MAXLEN regexp '[23]';
mysql> select * from CHARACTER_SETS where MAXLEN regexp '2|3';
mysql> select * from CHARACTER_SETS where MAXLEN regexp '[^23]';(^取否)

mysql> select * from CHARACTER_SETS where MAXLEN regexp '[1234]';
mysql> select * from CHARACTER_SETS where MAXLEN regexp '[1-4]';

匹配特殊字符(\\)
mysql> select * from CHARACTER_SETS where MAXLEN regexp '\\.';

拼接字段:
select Concat(CHARACTER_SET_NAME,'(',DESCRIPTION,')') from CHARACTER_SETS;

可通过rtrim删除右侧多余的空格来整理数据(ltrim去左边的空格)
mysql> select concat(rtrim(CHARACTER_SET_NAME) ,'(', rtrim(DESCRIPTION), ')') from CHARACTER_SETS;

执行算术计算
mysql> select COLLATION_NAME,ID,SORTLEN,ID*SORTLEN as expanded_num from COLLATIONS limit 3;
+-----------------+----+---------+--------------+
| COLLATION_NAME | ID | SORTLEN | expanded_num |
+-----------------+----+---------+--------------+
| big5_chinese_ci | 1 | 1 | 1 |
| big5_bin | 84 | 1 | 84 |
| dec8_swedish_ci | 3 | 1 | 3 |
+-----------------+----+---------+--------------+
3 rows in set (0.00 sec)

mysql> select COLLATION_NAME,ID,SORTLEN,ID*SORTLEN as expanded_num from COLLATIONS;
+--------------------------+-----+---------+--------------+
| COLLATION_NAME | ID | SORTLEN | expanded_num |
+--------------------------+-----+---------+--------------+
| big5_chinese_ci | 1 | 1 | 1 |
| big5_bin | 84 | 1 | 84 |
| dec8_swedish_ci | 3 | 1 | 3 |
| dec8_bin | 69 | 1 | 69 |
| cp850_general_ci | 4 | 1 | 4 |
| cp850_bin | 80 | 1 | 80 |
| hp8_english_ci | 6 | 1 | 6 |
| hp8_bin | 72 | 1 | 72 |

mysql> select id,IS_COMPILED,DESCRIPTION,maxlen,SORTLEN from CHARACTER_SETS,COLLATIONS where CHARACTER_SETS.CHARACTER_SET_NAME = COLLATIONS.CHARACTER_SET_NAME order by maxlen,sortlen;

内部联结(和上句结果一样)
mysql> select id,IS_COMPILED,DESCRIPTION,maxlen,SORTLEN from CHARACTER_SETS inner join COLLATIONS on CHARACTER_SETS.CHARACTER_SET_NAME = COLLATIONS.CHARACTER_SET_NAME order by maxlen,sortlen;

联结多个表:
mysql> select COLUMN_NAME,ORDINAL_POSITION,ID,IS_DEFAULT,DESCRIPTION from KEY_COLUMN_USAGE,COLLATIONS,CHARACTER_SETS where KEY_COLUMN_USAGE.ORDINAL_POSITION = COLLATIONS.SORTLEN and COLLATIONS.CHARACTER_SET_NAME = CHARACTER_SETS.CHARACTER_SET_NAME and DESCRIPTION = 'UJIS for Windows Japanese' limit 5;
+------------------+------------------+----+------------+---------------------------+
| COLUMN_NAME | ORDINAL_POSITION | ID | IS_DEFAULT | DESCRIPTION |
+------------------+------------------+----+------------+---------------------------+
| Host | 1 | 97 | Yes | UJIS for Windows Japanese |
| Host | 1 | 97 | Yes | UJIS for Windows Japanese |
| db | 1 | 97 | Yes | UJIS for Windows Japanese |
| name | 1 | 97 | Yes | UJIS for Windows Japanese |
| help_category_id | 1 | 97 | Yes | UJIS for Windows Japanese |
+------------------+------------------+----+------------+---------------------------+
5 rows in set (0.01 sec)

COLLATION_NAME,DESCRIPTION,MAXLEN

mysql> SELECT COLLATION_NAME,DESCRIPTION from character_sets as c1, COLLATIONS as c2 where c1.maxlen = c2.ID and c2.ID = '1';

mysql> select character_sets.maxlen,COLLATIONS.id from character_sets inner join COLLATIONS on character_sets.maxlen = COLLATIONS.id;

mysql> select character_sets.maxlen,COLLATIONS.id from character_sets left outer join COLLATIONS on character_sets.maxlen = COLLATIONS.id order by maxlen;

mysql> select character_sets.maxlen,COLLATIONS.id from character_sets right outer join COLLATIONS on character_sets.maxlen = COLLATIONS.id order by maxlen;

select ID,COLLATION_NAME,SORTLEN FROM COLLATIONS WHERE SORTLEN BETWEEN 2 AND 5 UNION all select ID,COLLATION_NAME,SORTLEN FROM COLLATIONS WHERE ERE SORTLEN > 2 ;

启用全文本搜索支持
mysql> create table producnotes (note_id int not null auto_increment,pro_id char(10) not null,note_date datetime not null,note_text text null,Primary key(note_id),fulltext(note_text)) engine=MyISAM;
Query OK, 0 rows affected (0.04 sec)

mysql> create table customers(cust_id int not null auto_increment, cust_name char(50) not null , cust_address char(50) null ,cust_city char(50) null, cust_state char(5) null, cust_zip char(10) null, cust_country char(50) null, cust_contact char(50) null, cust_email char(255) null,primary key (cust_id)) engine=Innodb;
Query OK, 0 rows affected (1.27 sec)

mysql> insert into customers(cust_name, cust_address ,cust_city, cust_state, cust_zip, cust_country, cust_contact, cust_email) values('Pep E. LaPew','100 Main street', 'los angeles', 'CA', '90046', 'USA', NULL,NULL);
Query OK, 1 row affected (0.01 sec)

mysql> select * from customers;
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| cust_id | cust_name | cust_address | cust_city | cust_state | cust_zip | cust_country | cust_contact | cust_email |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| 1 | Pep E. LaPew | 100 Main street | los angeles | CA | 90046 | USA | NULL | NULL |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
1 row in set (0.00 sec)

mysql> create table orders(
-> order_num int not null auto_increment,
-> order_date datetime not null,
-> order_id int not null,
-> primary key(order_num))
-> engine=Innodb;
Query OK, 0 rows affected (0.14 sec)

mysql> create table vendors(
-> vend_id int not null AUTO_INCREMENT,
-> vend_name char(50) not null,
-> vend_address char(50) not null,
-> vend_city char(50) null,
-> vend_state char(50) null,
-> vend_zip char(50) null,
-> vend_country char(50) null,
-> primary key (vend_id))
-> ENGINE=Innodb;
Query OK, 0 rows affected (0.16 sec)

mysql> create table orderitems(
-> order_num int not null,
-> order_item int not null,
-> pro_id char(50) not null,
-> quantity int not null,
-> item_price decimal(8,2) not null,
-> primary key(order_num,order_item))
-> ENGINE=InnoDB;
Query OK, 0 rows affected (0.22 sec)

mysql> alter table vendors add vend_phone char(20);
Query OK, 0 rows affected (0.18 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> ALTER TABLE orderitems ADD CONSTRAINT fk_ordertems_orders FOREIGN KEY (order_num) REFERENCES orders (order_num);
Query OK, 0 rows affected (0.16 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> insert into customers values(null,'simon','58 street','beijing','CA','10008','CHINA','185xxxxxx','yongsan');
Query OK, 1 row affected (0.07 sec)

mysql> select * from customers;
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| cust_id | cust_name | cust_address | cust_city | cust_state | cust_zip | cust_country | cust_contact | cust_email |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| 1 | Pep E. LaPew | 100 Main street | los angeles | CA | 90046 | USA | NULL | NULL |
| 2 | simon | 58 street | beijing | CA | 10008 | CHINA | 185xxxxxx | yongsan |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
2 rows in set (0.00 sec)

mysql> insert into customers(cust_name,cust_address,cust_city,cust_state,cust_zip,cust_country,cust_contact,cust_email) values('alex','32 street','shanghai','CA','10086','CHINA','183xxxxxx','lys');
Query OK, 1 row affected (0.02 sec)

mysql> select * from customers;
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| cust_id | cust_name | cust_address | cust_city | cust_state | cust_zip | cust_country | cust_contact | cust_email |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| 1 | Pep E. LaPew | 100 Main street | los angeles | CA | 90046 | USA | NULL | NULL |
| 2 | simon | 58 street | beijing | CA | 10008 | CHINA | 185xxxxxx | yongsan |
| 3 | alex | 32 street | shanghai | CA | 10086 | CHINA | 183xxxxxx | lys |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
3 rows in set (0.00 sec)

mysql> insert into customers(cust_name,cust_address,cust_city,cust_state,cust_zip,cust_country,cust_contact,cust_email) values('a1','33 street','shanghai','CA','10386','JAPAN','123xxxxxx','LLLL'); insert into customers(cust_name,cust_address,cust_city,cust_state,cust_zip,cust_country,cust_contact,cust_email) values('YS','33 street','SHanghai','CD','10010','HK','111xxxxxx','ly1s');
Query OK, 1 row affected (0.02 sec)

Query OK, 1 row affected (0.01 sec)

mysql> update customers set cust_email = 'sina@staff' where cust_id = 4;
Query OK, 1 row affected (0.02 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from customers;
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| cust_id | cust_name | cust_address | cust_city | cust_state | cust_zip | cust_country | cust_contact | cust_email |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| 1 | Pep E. LaPew | 100 Main street | los angeles | CA | 90046 | USA | NULL | NULL |
| 2 | simon | 58 street | beijing | CA | 10008 | CHINA | 185xxxxxx | yongsan |
| 3 | alex | 32 street | shanghai | CA | 10086 | CHINA | 183xxxxxx | lys |
| 4 | a1 | 33 street | shanghai | CA | 10386 | JAPAN | 123xxxxxx | sina@staff |
| 5 | YS | 33 street | SHanghai | CD | 10010 | HK | 111xxxxxx | ly1s |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
5 rows in set (0.00 sec)

mysql> update customers set cust_city = 'hefei', cust_state = 'HR' where cust_id = 4;
Query OK, 1 row affected (0.07 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> select * from customers;
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| cust_id | cust_name | cust_address | cust_city | cust_state | cust_zip | cust_country | cust_contact | cust_email |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
| 1 | Pep E. LaPew | 100 Main street | los angeles | CA | 90046 | USA | NULL | NULL |
| 2 | simon | 58 street | beijing | CA | 10008 | CHINA | 185xxxxxx | yongsan |
| 3 | alex | 32 street | shanghai | CA | 10086 | CHINA | 183xxxxxx | lys |
| 4 | a1 | 33 street | hefei | HR | 10386 | JAPAN | 123xxxxxx | sina@staff |
| 5 | YS | 33 street | SHanghai | CD | 10010 | HK | 111xxxxxx | ly1s |
+---------+--------------+-----------------+-------------+------------+----------+--------------+--------------+------------+
5 rows in set (0.00 sec)

视图:
mysql> select note_text,cust_name,cust_city,cust_email from producnotes, customers where note_id = cust_id;
+-----------+--------------+-------------+------------+
| note_text | cust_name | cust_city | cust_email |
+-----------+--------------+-------------+------------+
| test.txt | Pep E. LaPew | los angeles | NULL |
| test1.txt | simon | beijing | yongsan |
| test3.txt | alex | shanghai | lys |
| test4.txt | a1 | hefei | sina@staff |
| test5.txt | YS | SHanghai | ly1s |
+-----------+--------------+-------------+------------+
5 rows in set (0.00 sec)

mysql> CREATE VIEW PRODUTCUSTOMERS AS select note_text,cust_name,cust_city,cust_email from producnotes, customers where note_id = cust_id;
Query OK, 0 rows affected (0.01 sec)

mysql> SELECT * FROM PRODUTCUSTOMERS;
+-----------+--------------+-------------+------------+
| note_text | cust_name | cust_city | cust_email |
+-----------+--------------+-------------+------------+
| test.txt | Pep E. LaPew | los angeles | NULL |
| test1.txt | simon | beijing | yongsan |
| test3.txt | alex | shanghai | lys |
| test4.txt | a1 | hefei | sina@staff |
| test5.txt | YS | SHanghai | ly1s |
+-----------+--------------+-------------+------------+
5 rows in set (0.00 sec)

管理事务处理:
mysql> start transaction;
Query OK, 0 rows affected (0.00 sec)

mysql> START TRANSACTION;
Query OK, 0 rows affected (0.00 sec)

mysql> DELETE FROM producnotes;
Query OK, 1 row affected (0.00 sec)

mysql> select * from producnotes;
Empty set (0.00 sec)

mysql> ROLLBACK;
Query OK, 0 rows affected, 1 warning (0.00 sec)

mysql> select * from producnotes;

mysql> show collation;
mysql> show character set;

mysql> show variables like 'character%';
+--------------------------+------------------------------------+
| Variable_name | Value |
+--------------------------+------------------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/local/mysql55/share/charsets/ |
+--------------------------+------------------------------------+
8 rows in set (0.00 sec

mysql> show variables like 'collation%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0.00 sec)

mysql必会必知的更多相关文章

  1. 必会必知git

    git必会必知   1 前言 git前身是BitKeeper,但是他不是开源软件,不符合当时开源趋势,于是就会有了开源的git,git开发只用了十天时间.目前git是公司开发必不可少的一个工具,用于多 ...

  2. Mysql数据库优化技术之配置篇、索引篇 ( 必看 必看 转)

    转自:Mysql数据库优化技术之配置篇.索引篇 ( 必看 必看 ) (一)减少数据库访问对于可以静态化的页面,尽可能静态化对一个动态页面中可以静态的局部,采用静态化部分数据可以生成XML,或者文本文件 ...

  3. 使用MySQL正则表达式 __MySQL必知必会

    正则表达式作用是匹配方本,将一个模式(正则表达式)与一个文本串进行比较. MySQL用WHERE子句对正则表达式提供了初步的支持,允许你指定用正则表达式过滤SELECT检索出的数据. MySQL仅支持 ...

  4. mysql运维必会的一些知识点整理

    (1)基础笔试命令考察 1.开启MySQL服务 /etc/init.d/mysqld start service mysqld start systemctl start mysqld 2.检测端口是 ...

  5. mysql运维必会的一些知识点整理(转自民工哥)

    (1)基础笔试命令考察 1.开启MySQL服务 /etc/init.d/mysqld start service mysqld start systemctl start mysqld 2.检测端口是 ...

  6. 最新Mysql大厂面试必会的34问题

    目录 1.mysql的隔离级别 2.MYSQL性能优化 常用5种方式 3.索引详解 1.何为索引,有什么用? 2.索引的优缺点 4.什么情况下需要建索引? 5.什么情况下不建索引? 6.索引的底层数据 ...

  7. 图解 & 深入浅出 JavaWeb:Servlet必会必知

    从[JavaEE 要懂的小事] Http相关,一直想写点Web开发相关的.最近项目接口开发紧,还有准备新的九月份战斗.JDK IO源码就隔一段落,温故知新看看Servlet & JSP 相关. ...

  8. 数据库必会必知 之 SQL四种语言:DDL DML DCL TCL

    作者:泥瓦匠 今天群里面讨论,DDL 还是 DML,我这种小白还是总结下他们的区别吧. 1. DDL - Data Definition Language 数据库定义语言:定义数据库的结构. 其主要命 ...

  9. 数据库必会必知 之 SQL四种语言:DDL DML DCL TCL(转)

    今天群里面讨论,DDL 还是 DML,我这种小白还是总结下他们的区别吧. 1. DDL – Data Definition Language 数据库定义语言:定义数据库的结构. 其主要命令有CREAT ...

随机推荐

  1. linux库冲突解决方法 apt purge / aptitude purge

    remove libs: [apt-get purge remove] or [aptitude purge] how to use apt-get and aptitude https://blog ...

  2. 洛谷 P2233 [HNOI]公交车线路

    洛谷 不知道大家做没做过传球游戏,这一题和传球游戏的转移方程几乎一样. 令\(A\)为\(1\)点,\(E\)为\(5\)点,那么\(f[i][j]\)代表第i步走到j的方案数. \[f[i][j]= ...

  3. Redis资料汇总(转)

    原文:Redis资料汇总专题 很多朋友反映,说NoSQLFan上的资料不少,但是要找到自己实用的太难,于是萌生做这样一个专题的想法.通过将不同NoSQL产品从入门到精通的各种资料进行汇总,希望能够让大 ...

  4. Python高级教程-切片

    Python中的切片 取一个list或tuple的部分元素是非常常见的操作.比如,一个list如下: >>> L = ['A','B','C','D'] 对经常取指定索引范围的操作, ...

  5. 利用EasySQLMAIL实现自动填写Excel表格并发送邮件(2)

    利用EasySQLMAIL实现自动填写Excel表格并发送邮件 转自:http://blog.sina.com.cn/s/blog_1549483b70102witg.html 前一篇博文中记录了“利 ...

  6. google protobuf使用2

    protobuf mutable_* 函数 从该函数的实现上来看,该函数返回指向该字段的一个指针.同时将该字段置为被设置状态. 若该对象存在,则直接返回该对象,若不存在则新new 一个.

  7. python全栈开发从入门到放弃之字符串的应用

    1.strip strip 脱去(...的)衣服 去掉左右两边的空白msg=' hellprint(msg) 1 print(msg.strip()) #去掉左右两边的空白 2 3 hello 4 h ...

  8. jsp、freemarker、velocity对比

    在java领域.表现层技术主要有三种:jsp.freemarker.velocity. jsp是大家最熟悉的技术长处:1.功能强大,能够写java代码2.支持jsp标签(jsp tag)3.支持表达式 ...

  9. CSS 中文字体 Unicode 编码表

    CSS 中文字体 Unicode 编码表 在 CSS 中设置字体名称,直接写中文是可以的.但是在文件编码(GB2312.UTF-8 等)不匹配时会产生乱码的错误. 为此,在 CSS 直接使用 Unic ...

  10. LightOJ - 1370 Bi-shoe and Phi-shoe (欧拉函数打表)

    题意:给N个数,求对每个数ai都满足最小的phi[x]>=ai的x之和. 分析:先预处理出每个数的欧拉函数值phi[x].对于每个数ai对应的最小x值,既可以二分逼近求出,也可以预处理打表求. ...