摘要:
1 select *from 2 (select count(sal) as "工资1000-" from emp where sal 1000 and sal 3000 and sal 4000) ; 6 7 8 select '1000-' as 工资区间,count(sal) as 人数 from emp where sal 1000 and sal 3000... 阅读全文
2017年8月22日
2017年8月7日
摘要:
1 package Test2; 2 3 //排序:Sort 4 public class Sort 5 { 6 public static void main(String[] args) 7 { 8 int[] data = {4,3,5,1,2}; //声明需要排序的数组 9 ... 阅读全文
摘要:
package Test2; //链表:LinkList public class LinkList { public static void main(String[] args) { } } class Link { class Node { private int key; //定义链表结点的存储数据 ... 阅读全文
2017年8月5日
2017年8月4日
2017年8月2日
摘要:
反射: 反射概念:在运行状态中,对于任意一个类都能知道这个类的所有方法和属性;对于任意一个对象,都能调用它的任意一个方法和属性,这种动态获取信息以及动态调用对象的方法的功能称为反射机制。java反射相关的类主要包括 Class 类型 Constructor 构造方法 Method 方法 Field 阅读全文
2017年7月26日
摘要:
--查询不重复的职位 select distinct job from emp; --查询年薪,起别名,别名不要用单引号括起来 select sal*12 as nianxin from emp sal; --以这样的形式显示具体数据:雇员编号是:姓名是:工资为:职位是:! select '雇员编号是:'||empno,'姓名是:'||ename,'工资是:'||sal,'职位是:'||job|... 阅读全文
摘要:
select * from goods; a char(10):='三星' --定长字符串 b varchar2(10):='三星'; --可变字符串 c binary_integer:='10001'; --带符号整数,为整数计算优化性能 d number(5,2):='123.45'; --... 阅读全文
摘要:
--数据库连接 --普通用户连接:Conn scott/tiger --超级管理员连接:Conn "sys/sys as sysdba" --Disconnect; 断开连接 --DML 语句(数据操作语言)Insert、Update、Delete、Merge --DDL 语句(数据定义语言)Create、Alter、Drop、Truncate --DCL 语句(数据控制语言)Grant、R... 阅读全文