上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 89 下一页
摘要: (背景是本地环境以前没有绑定过github,即没有残余文件) 本地设置用户名和链接远程账户(引号内修改为自己的用户名和账号) git config --global user.name"wangqinghe95"git config --global user.email"675072584@qq. 阅读全文
posted @ 2020-08-29 11:41 王清河 阅读(4540) 评论(0) 推荐(0) 编辑
摘要: 登录mysql(ubuntu) mysql -uroot -pmysql123 source /home/ubuntu/test.sql 1.按照oracle语句写 select e.name, b.name from emp e, emp b where e.mgr = b.empno; 2.改造 阅读全文
posted @ 2020-07-25 17:05 王清河 阅读(102) 评论(0) 推荐(0) 编辑
摘要: 背景: C++ peimer 第七章第二小节的代码 如果在同一个文件中编译没问题,但是如果分发到 .hpp 和 .cpp 两个文件中,就会出现 error 2019 的错误 把内联的几个 inline 去掉后,就可以编译编译成功。此处是问题一,这个内联定义影响到了C++编译期链接中间函数名,这个是为 阅读全文
posted @ 2020-07-23 14:25 王清河 阅读(831) 评论(0) 推荐(0) 编辑
摘要: **约束条件:** FOREIGN KEY:在子表中定义一个级表约束 REFERENCES:指定表和父表中的列 ON DELETE CASCADE:当删除父表时,级联删除子表纪录 ON DELETE SET NULL:将子表的相关依赖纪录外键置为 null create table teacher 阅读全文
posted @ 2020-07-04 15:17 王清河 阅读(240) 评论(0) 推荐(0) 编辑
摘要: # 处理数据 ## insert --1.向表中插入所有列(所有不需要写列名) insert into emp values (1, 'tom_111', 'clerk', 7839, sysdate, 8500, 10000, 10); --2.向表中插入部分列 insert into emp(e 阅读全文
posted @ 2020-07-04 15:16 王清河 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 求出谁的工资比 scott 工资高 1.先求出scott工资 select sal from emp where ename = 'SCOTT'; 2.查询谁的工资比scott高 select * from emp where sal > (select sal from emp where ena 阅读全文
posted @ 2020-07-04 15:14 王清河 阅读(228) 评论(0) 推荐(0) 编辑
摘要: 按部门统计员工人数:部门号,部门名称,各部门人数 select d.deptno, d.dname, count(e.empno) from dept d, emp e where d.deptno = e.deptno group by d.deptno, d.dname 上诉结果没有出现40号部 阅读全文
posted @ 2020-07-04 15:09 王清河 阅读(175) 评论(0) 推荐(0) 编辑
摘要: 先上代码 #include<cstdio> #include<cstring> #define OFFSET(TYPE, MEMBER, OFF) \ TYPE temp; \ OFF = (unsigned long)(&(temp.MEMBER)) - (unsigned long)(&(tem 阅读全文
posted @ 2020-06-29 10:12 王清河 阅读(214) 评论(0) 推荐(0) 编辑
摘要: #include<stdio.h> #include<cstdlib> int main() { union { short s; char c[sizeof(s)]; }un; un.s = 0x0102; if (sizeof(short) == 2) { if (un.c[0] == 1 && 阅读全文
posted @ 2020-06-27 09:58 王清河 阅读(144) 评论(0) 推荐(0) 编辑
摘要: --求员工表的最高工资,最低工资,平均工资,所有工资 select max(sal) 最高工资, min(sal) 最低工资, avg(sal) 平均工资, sum(sal) 所有工资 from emp; --求平均奖金 select avg(comm) 方式1, sum(comm)/count(e 阅读全文
posted @ 2020-06-20 11:12 王清河 阅读(230) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 89 下一页