6 rows in set (0.00 sec) # 我们再把 table 的位置交换一下,再用 right join 试试 select a.id,a.name,b.dept_id from emp_dept b right join emp a on (a.id=b.emp_id); mysql> select a.id,a.name,b.dept_id -> from emp_dept b right join emp a on (a.id=b.emp_id); +----+…
1,针对mysql操作 SET PASSWORD FOR 'root'@'localhost' = PASSWORD('newpass'); 设置密码 update user set password=passworD("test") where user='root';修改密码 flush privileges; grant all on *.* to root@'%' identified by 'your_password'; mysql> select user,pass…