电脑上CMD查询时乱码:set names gbk;
查看表结构:show columns from 表名;
连接查询如:select a.id,a.name,b.title from my_admin_user a left join my_admin_shop b on a.shopid = b.id order by a.create_time limit 30;
null的使用: is null 或者 is not null,不能使用=null;
mysql正则表达式:
=======================================================
win下配置mysql环境变量时,目录指向MYSQL目录下的BIN目录即可.
同时连接数据库的命令:mysql -h localhost -u root -p
下面来对mysql分表进行一个测试,看用 navicate分表怎么用。
语句:
create table user( id int not null auto_increment, username varchar(10), primary key(id) )engine = innodb charset=utf8 partition by range (id)( partition user_1 values less than (10), partition user_2 values less than (20) );
参考内容:https://www.cnblogs.com/phpshen/p/6198375.html
查看mysql事务隔离级别:select @@tx_isolation
修改mysql事务隔离级别 ({READ UNCOMMITTED | READ COMMITTED | REPEATABLE READ | SERIALIZABLE})
SET GLOBAL TRANSACTION ISOLATION LEVEL REPEATABLE READ;或者
set tx_isolation='READ-COMMITTED';