`

1z0-007 题库笔记

阅读更多

 

InStr函数是一个字符串函数,它的作用是返回某字符串在另一字符串中第一次出现的位置。

InStr函数的格式为:InStr([start, ]string1, string2[, compare])

nvl2(a,b,c) ,如果a不为null 则返回B,如果a为null则返回C

trunc实际上是truncate函数,字面意思是截断,截尾。函数的功能是将数字进行截断。
例如   tranc(1234.5678,2)的结果为1234.5600。tranc()并不四舍五入。再举例:  
tranc(1234.5678,0)的结果为1234.0000;tranc(1234.5678,-2)的结果为1200.0000。

SELECT ROUND( number, [ decimal_places ] ) FROM DUAL
decimal_places : 四捨五入 , 小數取幾位 ( 預設為 0 )
select round(123.456) from dual;              回傳 123
select round(123.456, 0) from dual;          回傳 123
select round(123.456, 1) from dual;          回傳 123.5
select round(123.456, 2) from dual;          回傳 123.46
select round(123.456, 3) from dual;          回傳 123.456
select round(-123.456, 2) from dual;        回傳 -123.46

decode(条件,值1,翻译值1,值2,翻译值2,...值n,翻译值n,缺省值)

NULLIF() 函数在expression1 与expression2 相等时返回NULL 值,若不相等时则返回expression1 的值

mod(number1,number2) 描述 两个数值相除并返回其余数。

oracle的数据库里有个函数LPAD(String a,int length,String addString). 2作用:把addString添加到a的左边,length 是返回值的长度
RPAD和LPAD(粘贴字符) RPAD 在列的右边粘贴字符. LPAD 在列的左边粘贴字符

like % 代表0或多个字符
   _代表一个字符
escape 转仪 %, _
exp: job_id like '%sa\_%' escape '\';
exp: job_id like '%sa@_%' escape '@';

多个表可以用 select * from table1 left join table2 on 条件1 left join table3 on 条件2 left join table4 on 条件3 where 条件4 的形式写。

insert into (select ... from ... where ... with check option) values ...
可以把那个子查询看成一个视图或者表,insert into table_name(or subquery) values();
1.对于update,有with check option,要保证update后,数据要被视图查询出来
2.对于delete,有无with check option都一样
4.对于insert,有with check option,要保证insert后,数据要被视图查询出来
对于没有where 子句的视图,使用with check option是多余的

则必须使用 WITH CHECK OPTION 定义该视图。这个选项可以确保数据库中正在修改的数据的完整性。如果在 INSERT 或 UPDATE 操作期间违反了条件,
则返回 SQL 错误。

INTERVAL数据类型用来存储两个时间戳之间的时间间隔
oracle支持两种INTEVAL类型,它们分别是YEAR TO MONTH和DAY TO SECOND

rollback to savepoint 
commit

using
他是给bind变量传入值用的,比如:
for i2 in 1..1000 loop
execute immediate ‘select * from tablex where id=:1‘ using i2;
end loop;

SELECT e.last_name, d.department_name, d.location_id
FROM employees e JOIN departments d --on e.department_id=d.department_id
USING (department_id );

这个语句被执行1000次,每次查询条件不一样,但是该语句只被parse一次

这里要注意:fmDD 和 fmDDSPTH之间的区别。
select to_char(sysdate,'fmDDSPTH "of" MONTH YYYY AM') TODAYS FROM DUAL;
select to_char(sysdate,'DDSPTH "of" MONTH YYYY AM') TODAYS FROM DUAL;

SELECT TO_CHAR(TO_DATE('19-Mar-2001','DD-MON-YYYY') ,'fmDdspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE
FROM dual;
把Mar 改成 3月就不报错了。
SELECT TO_CHAR(TO_DATE('19-3月-2001','DD-MON-YYYY') ,'fmDdspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE
FROM dual;

Oracle 中的natural join (自然连接)
虽然natural join(自然连接)实际上的用的比较少,但实际上这个连接是非常有用的,若能经常使用一下,实际上是非常方便的。

自然连接是在两张表中寻找那些数据类型和列名都相同的字段,然后自动地将他们连接起来,并返回所有符合条件按的结果。

reference ['refrəns]
n. 参考,出处,参照
Properties..
1. 属性

even if there are no employees in the departments and even if the departments are not yet assigned to a location.
即使没有员工的主管部门和即使部门还没有分配到一个地点。

regarding [ri'gɑ:diŋ]
prep. 关于,至于

ignore [ig'nɔ:]
v. 不顾,不理,忽视
以上来源于: Dict.cn

aggregate ['ægrigeit]
n. 合计,总计,集合体
a. 合计的,集合的,聚合的
v. 聚集,集合,合计

parentheses
圆括号

exclude [iks'klu:d]
v. 除外,排除,拒绝
[计算机] 排除

aggregate ['ægrigeit]
n. 合计,总计,集合体
a. 合计的,集合的,聚合的
v. 聚集,集合,合计

specify   指定

nonequlijoin  不平查询

manipulate [mə'nipjuleit] vt. 操作;操纵;巧妙地处理;篡改

What is true about joining tables through an equijoin?

A. You can join a maximum of two tables through an equijoin.
B. You can join a maximum of two columns through an equijoin.
C. You specify an equijoin condition in the SELECT or FROM clauses of a SELECT statement.
D. To join two tables through an equijoin, the columns in the join condition must be primary key and foreign
key columns.
E. You can join n tables (all having single column primary keys) in a SQL statement by specifying a minimum
of n-1 join conditions.

下面哪个关于等值连接的说法是正确的?
A 你最多只能做两个表的等值连接
B 等值连接最多只能连接两个字段
C 你能在select语句或者from语句中做等值连接
D 只能使用主键或外键做等值连接的条件
E 最少n-1个连接条件就能连接n张表(所有表的主键都只有一列)

毫无疑问,只有E是正确的

大型知名网站域名被hold
从CNNIC自查域名备案以来,先是禁止CN域名个人注册,后又出台规定今后未备案域名不予解析。不到一个月10万个人网站遭关停。但企业站被关还是第一次,特别是it168,域名被停止解析在it科技资讯类网站中尚无先例

连it168,51.com liba.com都没有逃过这次互联网的大整顿,更何况势单力薄的草根站长们。

注意对网站内容的审查。如果真的不放心,国际域名的站长可以转移国外,使用中国域名的站长可以及时转型国际域名,保护好自己的网站,才能顺利在这次的风暴中存活下来。洗牌之后,网络环境会更加成熟稳定,新的机遇会出现,站长不要灰心丧气,坚持坚持再坚持。

整日埋头做网站,忙里偷闲炒玉米

没人了解我的苦. google都不了解  呵呵  不想做房奴呀  谁投资我!!

13817807591  --视频电话测试

15921669402 

T网GPRS流量(byte)   0  10485760
T网本地时长(含可视)(分钟)   11  39
本地时长(分钟)   91  409

移动数据流量(KB)   2028  28692

audio ['ɔ:diəu] adj. 声音的;音频的,声频的

nested ['nestid]
嵌套的

violate ['vaiəleit] vt. 违反;侵犯,妨碍;亵渎

existing [ig'zistiŋ]
[计算机] 现有的

effects [i'fekts]
n. pl.结果,效果,作用

degradation [,degrə'deiʃən]
n. 降格,堕落,退化

consume [kən'sju:m]
vt. 消耗,消费;使…著迷;挥霍
vi. 耗尽,毁灭;耗尽生命

recommendations
n. 推荐

statistics [stə'tistiks] n. 统计;统计学;统计资料

restructuring
构造转化
重组

retention [ri'tenʃən] 保存
retained  adj. 保留的
v. 保留;保存力

guaranteed [,gærən'ti:d]
a. 有保证的,有人担保的

be available可供使用的;有空的

scenario [si'nɑ:riəu, -'næ-, -'nεə-] n. 情节;剧本;方案

accomplish [ə'kʌmpliʃ, ə'kɔm-] vt. 完成;实现;达到

performance [pə'fɔ:məns]
n. 表演,表现
n. 性能
perform [pə'fɔ:m]
v. 执行,表演,做
dynamically 
adv. 充满活力地;不断变化地;动态地

at regular intervals每隔一定时间(距离)

回顾学习英语的历程  原来一天一个单词都没记住。所以应该不断的重复。学一个算一个。

Q: 10 Click the ExhibIT button and examine the data from the EMP table.
The COMMISSION column shows the monthly commission earned by the employee.
Which three tasks would require subqueries or joins in order to be performed in a single step? (Choose
three.)
点击执行按钮查询emp表的记录
commission 列显示的是雇员每个月的佣金
选择 需要子查询或者连接查询的3项 目的是完成独立的操作
下面说说选项
A. deleting the records of employees who do not earn commission
B. increasing the commission of employee 3 by the average commission earned in department 20
C. finding the number of employees who do NOT earn commission and are working for department 20
D. inserting into the table a new employee 10 who works for department 20 and earns a commission that is
equal to the commission earned by employee 3
E. creating a table called COMMISSION that has the same structure and data as the columns EMP_ID and
COMMISSION of the EMP table
F. decreasing the commission by 150 for the employees who are working in department 30 and earning a
commission of more than 800
A 删除佣金为空的雇员信息  所以不选
B 增加雇员3的佣金 参照部门20的平均工资 所以这里要来个子查询 求出部门20的平均工资 所以选择
C 查找出为部门20工作的员工并且佣金为空的 不选择
D 添加一条员工工号为10 部门号为 20 的记录 并且该员工的佣金和员工3相等 用到子查询 即选择
E 创建一个表commission 这个表和emp表的emp_id和commission结构和数据类型一致  哪么这个也要选择 用到子查询
F 降低为部门30工作的员工并且佣金超过800的员工佣金 0.15 不需要子查询 所以不选择

Answer: B, D, E

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics