摘要: 注意在当前窗口是修改了的: 而在其他窗口是不修改的: select @@autocommit; 修改为手动提交: 阅读全文
posted @ 2024-09-08 21:48 wangyin0425 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 数据准备 DROP TABLE IF EXISTS emp; DROP TABLE IF EXISTS dept; DROP TABLE IF EXISTS job; DROP TABLE IF EXISTS salarygrade; -- 部门表 CREATE TABLE dept ( id IN 阅读全文
posted @ 2024-09-08 21:19 wangyin0425 阅读(4) 评论(0) 推荐(0) 编辑
摘要: select * from emp where salary > (select salary from emp where name='猪八戒'); 1. select * from emp where dep_id in (select did from dept where dname in 阅读全文
posted @ 2024-09-08 18:12 wangyin0425 阅读(3) 评论(0) 推荐(0) 编辑
摘要: select emp.name,emp.gender,dept.dname from emp,dept where emp.dep_id=dept.did; select t1.name,t1.gender,t2.dname from emp t1,dept t2 where t1.dep_id=t 阅读全文
posted @ 2024-09-08 16:43 wangyin0425 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1. create table dept( did int primary key auto_increment, dname varchar(20) ); 2. create table emp( id int primary key auto_increment, name varchar(10 阅读全文
posted @ 2024-09-08 16:03 wangyin0425 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 1. create table music( id int PRIMARY key, title varchar(32), alias varchar(32), image varchar(64), style varchar(8), type varchar(4), medium varchar( 阅读全文
posted @ 2024-09-08 10:33 wangyin0425 阅读(9) 评论(0) 推荐(0) 编辑
摘要: create table tb_order( id int PRIMARY key auto_increment, payment double(10,2), payment_type tinyint, status Tinyint ); create table tb_goods( id int 阅读全文
posted @ 2024-09-08 09:48 wangyin0425 阅读(5) 评论(0) 推荐(0) 编辑
摘要: ![](https://img2024.cnblogs.com/blog/3516303/202409/3516303-20240908084023004-1585554575.png) ![](https://img2024.cnblogs.com/blog/3516303/202409/3516303-20240908084549435-1247608085.png) 阅读全文
posted @ 2024-09-08 08:47 wangyin0425 阅读(4) 评论(0) 推荐(0) 编辑