摘要: 只要你跟你的好盆友相互坦诚问了这36个问题,你们的关系会越来越好的!!! 第一组 1.如果可以请到全世界任何人,你会邀请谁一起吃晚餐?2.你想出名吗?想怎样出名?3.在打电话之前,你会预先演练一下待会要说的话吗?为什么?4.对你来说,“完美的一天”必须包含那些元素?5.你上一次唱歌给自己听是什么时候 阅读全文
posted @ 2020-05-20 01:51 YC_Muck 阅读(1258) 评论(0) 推荐(0) 编辑
摘要: -- 一、立刻执行SQL语句 declare mysql varchar2(200); -- 保存SQL语句(所谓的动态SQL,就是一个可变的变量) begin mysql := 'select 1+1 from dual'; dbms_output.put_line(mysql); end; de 阅读全文
posted @ 2020-05-20 01:49 YC_Muck 阅读(284) 评论(0) 推荐(0) 编辑
摘要: -- 分页 select * from t_user5 select count(1) from t_user5 --10,485,760 -- rownum是一个查询后的结果,查询之前是不存在的 select rownum,rowid,tt.* from t_user5 tt where rown 阅读全文
posted @ 2020-05-20 01:47 YC_Muck 阅读(161) 评论(0) 推荐(0) 编辑
摘要: -- 假设分了4个部门(存款部,ATM部,转出,转入) --每个月定期最后1天自动生成4张表的数据 --(数据来源:deal_record) -- 第一步:先把4张表建立起来 -- 存款表 create table r1( id number primary key, card_id varchar 阅读全文
posted @ 2020-05-20 01:46 YC_Muck 阅读(755) 评论(0) 推荐(0) 编辑
摘要: select * from tt3 -- 20年后多少岁 declare age tt3.age%type; dif tt3.age%type; begin select age into age from tt3 where id=1; dif := 20; -- 设置一个年龄差 age:= ag 阅读全文
posted @ 2020-05-20 01:43 YC_Muck 阅读(151) 评论(0) 推荐(0) 编辑
摘要: create table bank_user( card_id varchar2(18) primary key, --身份证号码 user_name varchar2(100), 姓名 ye number, 余额(冗余的) status number 状态 1正常 0锁定 ); drop tabl 阅读全文
posted @ 2020-05-20 01:42 YC_Muck 阅读(129) 评论(0) 推荐(0) 编辑
摘要: --通过用户ID,查找出名字,以及城市 create or replace procedure testp1(my_id in tt3.id%type,my_user_name out tt3.user_name%type,my_city out tt3.city%type) as begin se 阅读全文
posted @ 2020-05-20 01:40 YC_Muck 阅读(158) 评论(0) 推荐(0) 编辑
摘要: --Basic loop ... end loop; declare i number:= 1; begin i:=100; loop i:= i + 1; dbms_output.put_line(i); if i>10 then exit; end if; end loop; end; -->> 阅读全文
posted @ 2020-05-20 01:37 YC_Muck 阅读(159) 评论(0) 推荐(0) 编辑
摘要: if (分3类) java if (条件) { .... } pl/sql if 条件 then ..... end if; select * from tt3 select age from tt3 where id=1 declare myage tt3.age%type; begin sele 阅读全文
posted @ 2020-05-20 01:36 YC_Muck 阅读(8020) 评论(0) 推荐(0) 编辑
摘要: create view t_myuser as select ooo.*, decode(sign((select avg(score)-struts from t_user_score where ke='struts')),1,'是的,低于平均分',-1,'高于平均分','跟平均分持平') lo 阅读全文
posted @ 2020-05-20 01:33 YC_Muck 阅读(153) 评论(0) 推荐(0) 编辑
摘要: select rowid,id,display,key_value,key_type,lang from oa.dicts -->>物理层面的 --从物理层面上提速 --一、内存的提升 --修改SGA alter system set sga_max_size=4096M scope=spfile; 阅读全文
posted @ 2020-05-20 01:28 YC_Muck 阅读(158) 评论(0) 推荐(0) 编辑
摘要: CREATE TABLE t_user3( id NUMBER PRIMARY KEY, user_name VARCHAR2(20), birt_date date -->>java.util.Date(包含日期+时间) ) INSERT INTO t_user3 VALUES (1,'小明',t 阅读全文
posted @ 2020-05-20 01:27 YC_Muck 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 一、集合 概念: 集合是指具有某种特定性质的具体的或抽象的对象汇总而成的集体。其中,构成集合的这些对象则称为该集合的元素。 基数: 集合中元素的数目称为集合基数,集合A的基数记作card(A)。当其为有限大时,集合A称为有限集,反之则为无限集 一般的,把含有有限个元素的集合叫做有限集,含无限个元素的 阅读全文
posted @ 2020-05-20 01:23 YC_Muck 阅读(415) 评论(0) 推荐(0) 编辑
摘要: -- 多对多的秘密:项目中,往往把关系分拆出一张单独表 --维表(学生维度) create table t_stu( id number primary key, user_name varchar2(10) ); insert into t_stu values(1,'小军'); insert i 阅读全文
posted @ 2020-05-20 00:48 YC_Muck 阅读(322) 评论(0) 推荐(0) 编辑
摘要: select * from user1 select * from dicts -- 多对一(字典类应用) drop table user1; create table user1( id varchar2(10), username varchar2(20), sex varchar2(10), 阅读全文
posted @ 2020-05-20 00:43 YC_Muck 阅读(198) 评论(0) 推荐(0) 编辑
摘要: -- 一对多 (订单order,订单明细orderDetail) -- 主从表 -- 订单表 create table t_order ( order_id number primary key, today date, desk_num varchar2(10) ); insert into t_ 阅读全文
posted @ 2020-05-20 00:41 YC_Muck 阅读(713) 评论(0) 推荐(0) 编辑
摘要: -- 一对一 -- 身份证表 CREATE TABLE idcard ( idcard_num CHAR(18) PRIMARY KEY, name VARCHAR2(20), address VARCHAR2(100), minzu VARCHAR2(20) ); -- 学生表 CREATE TA 阅读全文
posted @ 2020-05-20 00:40 YC_Muck 阅读(258) 评论(0) 推荐(0) 编辑
摘要: mysql与Oracle的SQL对比 create table test1111( id number(10) primary key, username varchar2(100) ); create sequence myseq; select myseq.nextval from dual s 阅读全文
posted @ 2020-05-20 00:38 YC_Muck 阅读(123) 评论(0) 推荐(0) 编辑
摘要: 分类: 1、DDL(定义语句)create,alter,drop 不需要commit 2、DML(操纵语句) Insert ,update,delete Select ....for update 阅读全文
posted @ 2020-05-20 00:35 YC_Muck 阅读(165) 评论(0) 推荐(0) 编辑
摘要: --1、创建临时表空间 create temporary tablespace oa_temp tempfile 'c:\data\oa_temp_001.dbf' size 1024m extent management local; --2、创建用户数据表空间 create tablespace 阅读全文
posted @ 2020-05-20 00:32 YC_Muck 阅读(146) 评论(0) 推荐(0) 编辑