没有合适的资源?快使用搜索试试~ 我知道了~
首页071_161_10.22.pdf
资源详情
资源评论
资源推荐
1
Correct Answer: *^13
QUESTION 1
Choose the best answer.
Exanine the desciption of the EMPLOYEES table:
Nane Null Type
----------------------------------------------------------
EMP_ID NOT NUL NUMBER
EMP_NAME VARCHAR2 (40)
DEPT_ID NUMBER(2)
SALARY NUMBER(8,2)
JOIN_DATE DATE
Which query is valid?
A) SELECT dept_id, join_date, SUM(salary) FROM employees GROUP BY dept_id, join_date;
B) SELECT depe_id,join_date, SUM(salary) FROM employees GROUP BY dept_id:
C) SELECT dept_id,MAX (AVG (salary)) FROM employees GROUP BY dept_id;
D) SELECT dept_ id,AVG (MAX (salary)) FROM employees GROUP BY dapt_id;
Correct Answer: A
QUESTION 2
choose three
Which three are true about the CREATE TABLE command?
A) It can include the CREATE...INDEX statement for creating an index to enforce the primary key constraint.
B) The owner of the table should have space quota available on the tablespace where the table is defined.
C) It implicitly executes a commit.
D) It implicitly rolls back any pending transactions.
E) A user must have the CREATE ANY TABLE privilege to create tables,
F) The owner of the table must have the UNLIMITED TABLESPACE system privilege
Correct Answer: ABC
QUESTION 3
choose two
The CUSTOMERS table has a CUST_CREDT_LIMIT column of data type number.
Which two queries execute successtully?
A) SELECT TO_CHAR(NVL(cust_credit_limit * .15,'Not Available')) FROM customers;
B) SELECT NVL2(cust_credit_limit * .15,'Not AvailabIe') FROM customers;
C) SELECT NVL(cust_credit_limit * .15, 'Not Available') FROM customers;
D) SLECT NVL(TO_CHAR(cust_credit_limit * .15),'Not available') from customers;
E) SELECT NVL2(cust_credit_limit,TO_CHAR(cust_credit_limit * .15),'NOT Available') FROM customers;
Correct Answer: DE
解析:NVL 函数的参数数据类型需一样,NVL2 函数的第二个参数与第三个参数数据类型需要一样。
NVL(表达式1,表达式2) 如果表达式1为空值,NVL返回值为表达式2的值,否则返回表达式1的值
NVL2(表达式1,表达式2,表达式3) 如果表达式1为空,返回值为表达式3的值。如果表达式1不为空,返回值为表达式
2的值。
2
QUESTION 4
choose two
Exammine the desciption of the PRODUCT DETALS table:
NAME NULL TYPE
--------------------------------------------------
PRODUCT_ID NOT NULL NUMBER(2)
PRODUCT_NAME NOT NULL VARCHAR2(25)
PRODUCT_PRICE NUMBER(8,2)
EXPIRY_DATE DATE
Which two statements are true?
A) PRODUCT_ID can be assigned the PEIMARY KEY constraint.
B) EXPIRY_DATE cannot be used in arithmetic expressions.
C) EXPIRY_DATE contains the SYSDATE by defalt if no date is assigned to it
D) PRODUCT_PRICE can be used in an arithmetic expression even if it has no value stored in it
E) PRODUCT_PRICE contains the value zero by default if no value is assigned to it.
F) PRODUCT_NAME cannot contain dupicate values.
Correct Answer: AD
解析:D 选项当价格列没有值的时候,做算术表达式运算依然为没有值,但是不影响做算术表达式运算。
QUESTION 5
choose the best answer
The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2.
The table has two rows whose COST_LAST_MANE values are Anderson and Ausson.
Which query produces output for CUST_LAST_SAME containing Oder for the first row
and Aus for the second?
A) SELECT REPLACE (REPLACE(cust_last_name,'son',''),'An','O') FROM customers;
B) SELECT REPLACE (TRIM(TRALING 'son' FROM cust_last_name), 'An','O') FROM customers;
C) SELECT INITCAP (REPLACE(TRIM('son' FROM cust_last_name),'An','O')) FROM customers;
D) SELECT REPLACE (SUBSTR(cust_last_name,-3), 'An', 'O') FROM customers;
Correct Answer: A
解析:trim 只能处理过滤掉一个字符,不能过滤多个字符,所以BC 可以排除。
TRIM
我们看下trim函数的语法描述:trim( [ { {leading|trailing|both} [trim_character]|trim_character} from] trim_source
1)、不使用任何参数
SQL> select trim(' 11 ') aa from dual;
2)、使用both参数,效果等同于方法一不使用任何参数
SQL> select trim(both from ' 11 ') aa from dual;
3
3)、使用leading与trailing参数
SQL> select trim(leading from ' 11 ') aa from dual;
4)、使用trim_character参数
trim_character参数改变了“删除空格”的默认行为。如果想要删除字符串'xxxxWORLDxxxx'前后出现的“x”,“trim_character”
参数就派上用场了。
SQL> select trim('x' from 'xxxxWORLDxxxx') aaaaa from dual;
trim_character配合“both”、“trailing”和“leading”三个参数使用效果如下,与之前演示类似。看结果,不赘述。
SQL> select trim(both 'x' from 'xxxxWORLDxxxx') aaaaa from dual;
必须注意的一点是这里的“trim_character”参数只允许包含一个字符,不支持多字符。trim不能满足我们去除多字符要
求,但是我们可以使用rtrim和ltrim来处理。
1)使用rtrim
SQL> select rtrim('ORxxxxWORLDxxxxOR','OR') aaaaa from dual;
QUESTION 6
choose three
Which three statements are true about indexes and their administration in an Orade database?
A) An INVISIBLE index is not maintained when Data Manipulation Language (DML) is performed on its underlying table.
B) An index can be created as part of a CREATE TABLE statement.
C) A DROP INDEX statement always prevents updates to the table during the drop opeaton
D) A UNIQUE and non-unique index can be ceated on the same table colunn
E) A descending index is a type of funcion-based index
F) If a query filters on an indexed column then it will always be used during execution of the query
Correct Answer: BCE
解析:Unlike unusable indexes, an invisible index is maintained during DML statements.
invisible index(不可见的索引)。如今11g提供一个新特性,不可见索引。能够建索引设置为不可见索引。CBO在评估运行
计划的时候会忽略它,假设须要的时候。设置回来就可以。 另一种用途,你在调试一条SQL语句,要建一个索引測
试。而你不想影响其它的会话,用不可见索引正是时候
D -> ORA-01408: such column list already indexed
QUESTION 7
Choose three
Which three are true about granting object privileges on tables, views, and sequences?
A) UPDATE can be granted only on tables and views.
B) DELETE can be granted on tables, views, and sequences.
C) REFERENCES can be granted only on tables and views.
D) INSERT can be granted on tables, vews, and sequences.
E) SELECT can be granted only on tables and views.
F) ALTER can be granted only on tables and sequences.
Correct Answer: ACF
解析:对 sequence 的操作只有 select 与 alter 权限
Object privilege
table
view
sequence
procedure
ALTER
y
y
DELETE
y
y
4
EXECUTE
y
INDEX
y
INSERT
y
y
REFERENCES
y
y
SELECT
y
y
y
UPDATE
y
y
QUESTION 8
Choose the best answer
The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of
data type DATE
You want to display the date of the first Monday after the completion of six months
since hiring
The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday
is the first day ofthe week
Which query can be used?
A) SELECT emp_id,NEXT_DAY(ADD_MONTHS(hite_date,6), 'MONDAY') FROM employees;
B) SELECT emp_id,ADD_MONTHS(hire_date,6), NEXT_DAY('MONDAY') FROM employees;
C) SELECT emp_id,NEXT_DAY(MONTHS_BETWEEN(hire_date,SYSDATE),6) FROM employees;
D) SELECT emp_id,NEXT_DAY(ADD_MONTHS(hire_date,6),1) FROM employees;
Correct Answer: A
当前系统时间的下一星期一的时间 select next_day(sysdate,1) from dual
NEXT_DAY(date,char)
date 参数为日期型,
char:为 1~7 或 Monday/Mon~Sunday/
指定时间的下一个星期几(由 char 指定)所在的日期,
char 也可用 1~7 替代,1 表示星期日,2 代表星期一等
ORA-01846: 周中的日无效 这种情况是由于数据库语言是中文造成的。
show parameter nls_date_language;
如果返回的是 simplified chinese,表示中文,中文是用“星期一”这种表示的。要想用 monday,tuesday 这种英文表达,需
要改写实例参数 nls_date_language.
SQL> alter session set NLS_DATE_LANGUAGE = American;
SYSDATE+1, NEXT_DAY(SYSDATE+1,1), NEXT_DAY(SYSDATE+1,2), NEXT_DAY(SYSDATE+1,'MONDAY')
11-NOV-19 17-NOV-19 18-NOV-19 18-NOV-19
QUESTION 9
Choose three
Which three statements are true about views in an Oracle database?
A) A SELECT statement cannot contain a where clause when querying a view containing a WHERE clause in its defining
query
B) Rows inserted into a table using a view are retained in the table if the view is dropped
5
C) Views can join tables only if they belong to the same schema.
D) Views have no segment.
E) Views have no object number.
F) A view can be created that refers to a non-existent table in its defining query.
Correct Answer: BDF
解析:F:在没有基表的情况下也可以创建视图,通过 create force view 语法创建
QUESTION 10
Choose two
Which two statements are true about Oracle synonyms?
A) A synonym can have a synonym.
B) All private synonym names must be unique in the database.
C) Any user can create a PUBLIC synonym.
D) A synonym can be created on an object in a package.
E) A synonym has an object number.
Correct Answer: AE
24.3.2 Creating Synonyms
Create a synonym using the CREATE SYNONYM statement.
To create a private synonym in your own schema, you must have the CREATE SYNONYM privilege. To create a private
synonym in another user's schema, you must have the CREATE ANY SYNONYM privilege. To create a public synonym, you
must have the CREATE PUBLIC SYNONYM system privilege.
When you create a synonym, the underlying schema object need not exist, nor do you need privileges to access the object
for the CREATE SYNONYM statement to succeed. The following statement creates a public synonym named public_emp on
the emp table contained in the schema of jward:
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/admin/managing-views-sequences-and-
synonyms.html#GUID-407B4256-EA10-4362-88B9-16D16449B334
You can create both public and private synonyms. A public synonym is owned by the special user group named PUBLIC
and is accessible to every user in a database. A private synonym is contained in the schema of a specific user and available
only to the user and to grantees for the underlying object.
Synonyms themselves are not securable. When you grant object privileges on a synonym, you are really granting privileges
on the underlying object, and the synonym is acting only as an alias for the object in the GRANT statement.
QUESTION 11
Choose two.
Which two statements are true about a self join?
A) The join key column must have an index.
B) It can be a left outer join.
C) It must be a full outer join.
D) It can be an inner join.
E) It must be an equijoin.
剩余71页未读,继续阅读
QIDANIEL
- 粉丝: 21
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 收起
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
会员权益专享
最新资源
- c++校园超市商品信息管理系统课程设计说明书(含源代码) (2).pdf
- 建筑供配电系统相关课件.pptx
- 企业管理规章制度及管理模式.doc
- vb打开摄像头.doc
- 云计算-可信计算中认证协议改进方案.pdf
- [详细完整版]单片机编程4.ppt
- c语言常用算法.pdf
- c++经典程序代码大全.pdf
- 单片机数字时钟资料.doc
- 11项目管理前沿1.0.pptx
- 基于ssm的“魅力”繁峙宣传网站的设计与实现论文.doc
- 智慧交通综合解决方案.pptx
- 建筑防潮设计-PowerPointPresentati.pptx
- SPC统计过程控制程序.pptx
- SPC统计方法基础知识.pptx
- MW全能培训汽轮机调节保安系统PPT教学课件.pptx
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1