
mysql
zhou1124
这个作者很懒,什么都没留下…
展开
-
mysql创建用户加授权
-- mysql 创建用户加授权grant all privileges on emp.* to emp@'%' identified by 'emp-dev';flush privileges ;原创 2020-01-16 19:21:17 · 235 阅读 · 0 评论 -
mysql备份
逻辑备份用于备份数据库的结构(CREAET DATABASE、CREATE TABLE)和数据(INSERT),这种备份类型适合数据量小、跨SQL服务器、需要修改数据等场景。如mysqldump命令就是产生一个逻辑备份工具,使用mysqldump输出的文件包含CREATE TABLE和INSERT语句,能够直接重建表内容和表结构。使用逻辑备份有以下优势和劣势:优势可移植性高,SQ...原创 2020-01-03 21:38:52 · 227 阅读 · 0 评论 -
mysql insert into
给所有角色ID不是1的用户全部增加一条角色ID=1的记录insert into peppa.employee_role (role_Id,employee_Id) select 1,id from peppa.employee t where t.id not in(select employee_id from peppa.employee_role t1 where t1.role_id...原创 2019-12-13 10:25:29 · 115 阅读 · 0 评论 -
mysql用一张表的字段更新另一张表
update peppa.user_profile_extension t1,ucenter.student_profile t3 set t1.weight=t3.weight where t1.user_Id=t3.user_id and t1.user_id in ( select user_Id from ucenter.student_profile where weight is no...原创 2019-12-12 19:59:53 · 654 阅读 · 0 评论