20151219 ocp examA(60-70) examB(1-20)

64.view the exhibit button and examine the structures of orders and order_iten tables.in the 

orders table.order_id is the primary key and in the order_iterms table ,order_id and line_item_id form the composite primary key

which view can have all the dml operations performed on it?

b.create view v4(or_no,or_date,cust_id) as select order_id,order_date,customer_id from orders where 

order_date</...

所有dml操作都可以执行的视图要求是简单视图。视图可以通过创建试图名制定列名,也可以通过select字句制定列名

69.which three statements are true regarding the where and having clauses in a sql statement?

a.the having clause conditions can have aggregate functions

对 having字句是可以使用聚合函数的

b.the having clause conditions can usera liases for the columns

可以使用别名?

放屁 


exam b

2.evaluate the follwoing command 

create table employees(

employee_id number(2) primary key,

last_name varchar2(25) not null,

departtment_id number(2),job_id varchar2(8).

salary number(10,2));

you issuse the following command to create a view that dispalys the ids and last names of the sales 

staff in the organization;

create or replace view sales_staff_vu as select employee_id,last_name job_id

fromemployys where job_id like 'sa_%; with check optino;

a.it allows you to insert details of all new staff into the employees table

no 必须要符合with check option的内容

b.it allows you to delete the details of the existing sales staff from the employees table

delete 一个视图上面的记录会连带将对应表上的记录删除

c.it allows you to update the jobs ids of the exising sales staff to any other job id in the employees table

如果update后的job_id不符合check optin也不行

d.it allows you to insert the IDS,last names and job ids of the sales staff from the view if it is used iun multable insert strarements

from the view而不是向视图中插入数据 这是允许的

5.which two statements best desribe the benefits of using the with clause?

a.it enables users to store the results of a query permanently(永久的)

暂时保存而不是永久

b....还是permanently的问题

9.view the exhibit and examine the data in the products table

which statement would add a column called price,which cannot contain null?

c.alter table products add price number(8,2) default 0 not null;

要求非空的话必须设定默认值

10.evaluate the follwoing sql statemen;

create index upper_name_idx on product_information(upper(product_name));

which query would use the upper_name_idx index?

c.select product_id from t where upper(product_name) in (...)

d。select product_id,upper(product_name) from product_information where upper(product_name)=''.. or list_price>1000

因为List>1000是要走全表扫描的,所以会直接忽略掉索引


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值