Home > Database > Mysql Tutorial > MySQL Commons_MySQL

MySQL Commons_MySQL

WBOY
Release: 2016-06-01 13:10:27
Original
1218 people have browsed it


mysqldump Usage: mysqldump [OPTIONS] database [tables]OR     mysqldump [OPTIONS] --databases [OPTIONS] DB1 [DB2 DB3...]OR     mysqldump [OPTIONS] --all-databases [OPTIONS]
Copy after login




mysql> create  table t_test ( i int primary key auto_increment , j int , k int ) ;Query OK, 0 rows affected (0.15 sec) mysql> mysql> mysql> insert  into  t_test values(1,1,1) ON DUPLICATE KEY UPDATE j = j+1 , k=k+1 ;Query OK, 1 row affected (0.21 sec)mysql> mysql> insert  into  t_test values(1,1,1) ON DUPLICATE KEY UPDATE j = j+1 , k=k+1 ;Query OK, 2 rows affected (0.04 sec)mysql> select * from t_test ;+---+------+------+| i | j    | k    |+---+------+------+| 1 |    2 |    2 |+---+------+------+1 row in set (0.00 sec)mysql> insert  into  t_test values(1,1,1) ON DUPLICATE KEY UPDATE j = j+1 , k=k+1 ;Query OK, 2 rows affected (0.00 sec)mysql> select * from t_test ;+---+------+------+| i | j    | k    |+---+------+------+| 1 |    3 |    3 |+---+------+------+1 row in set (0.00 sec)
Copy after login


建立连接的时候指定 useUnicode=true  characterEncoding=utf-8 参数可防止乱码

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template