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 权限
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:为17或Monday/MonSunday/
指定时间的下一个星期几(由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
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.