OCP12C题库,71sql的使用
題數(shù): +38
8 月新增題型
01 examine this statement
檢查這個語句
select last_name from employees order by case where salary=(select max(salary) employees) then ‘A’ else last_name end,last_name desc;
which two statements are true?
哪兩種說法是正確的?
B) all remaining employee names will appear in descending order.
所有剩余的員工姓名將按降序顯示。
F) the names of employees earning the maximum salary will appear first in an unspecified order.
獲得最高工資的雇員的名字將以未指明的順序出現(xiàn)在最前面。
02 examine this statement:
select 1 as id, 'john; as first_name , null as commission from dual intersect
select 1, ;john;, null from dual order by 3;
what is returned upon execution?
執(zhí)行時返回什么?
B) 1 row
1行
03 examine this partial query:
檢查這個部分查詢:
which group by clause must be added so the query returns the results shown?
必須添加哪個group by子句,以便查詢返回所顯示的結(jié)果?
B) group by ch.channel_type, rollup(t_month, co_country_code).
按ch.channel_type、rollup(t_month, co_country_code)分組。
04 which two are true?
哪兩個是正確的?
C) floor returns the largest integer less than or equal to a specified number.
floor返回小于或等于指定數(shù)字的最大整數(shù)。
D) concat joins two character strings together.
concat連接兩個字符串。
05 which two are true?
哪兩個是正確的?
A) add_months adds a number of calendar months to a date.
add_months將日歷月的個數(shù)添加到一個日期。
D) last _day returns the date of the last day of the month for the date argument passed to the function.
last _day返回傳遞給函數(shù)的date參數(shù)當月最后一天的日期。
06 examine this statement:
檢查這個語句:
on which two columns of the table will an index be created automatically?
將在表的哪兩列上自動創(chuàng)建索引?
E) serial_no
F) order_id
07 you want to return the current date and time from the user session, with a date type of timestam with time one
您希望從用戶會話返回當前日期和時間,日期類型為timestam,時間為1
which function will do this ?
哪個函數(shù)可以做到這一點?
A) current_timestamp
08 which two will execute successfully?
哪兩個將成功執(zhí)行?
A) select nvi(‘date’,200) from ( select null as ‘‘date’’ from dual);
E) select nvl('date, sysdate) from dual;
09 which statement will execute successfully?
哪條語句會成功執(zhí)行?
A) select 1,2 from dual union select 3,4 from dual order by 1,2
從對偶集中選擇1,2,從對偶序中選擇3,4,從對偶序中選擇1,2
10 examine the description of the employyes table:
10檢視雇傭表的描述:
which statement will fail?
哪個語句會失敗?
A) select department_id , count() from employees where department_id < 90 and count() >3 group by department_id;
11 whth two are true about querles using set operators(union,union all, instersect and minus) ?
關(guān)于使用集合操作符(union,union all, instersect和minus)的查詢,哪兩個是真的?
B) none of the set operators can be used when selecting clob columns
在選擇clob列時,不能使用set操作符
D) there must be an equal number of columns in each select list
每個選擇列表的列數(shù)必須相等
12 examine the desciption of the employees tabl:
檢查員工的填寫情況:
which two queries return all rows for employees whose salary is greater than the average salary in their department?
哪兩個查詢返回工資大于其部門平均工資的員工的所有行?
A) select * from employees e1 where salary >( select avg(salary) from employees c2 where e1.department_id=e2.department_id);
C) select * from ( select e.*avg(salary) over(partition by department_id) avg_sal from employees e) where salary >avg_sal;
13 examine the description of the bricks_tables:
檢查bricks_tables的描述:
which two queries execute successfully?
哪兩個查詢成功執(zhí)行?
C) select shape,color from bricks minus select color,shape from bricks_stage
D) select brick_id, shape from bricks minus select weight, color from bricks_stage
14 you create a table named 123.
14創(chuàng)建了一個名為123的表。
which statement runs successfully?
哪條語句運行成功?
A) select * from “123”;
15 no user-defined locks are used in your database
數(shù)據(jù)庫中沒有使用用戶定義的鎖
which three are true about transaction control language(TCL)?
關(guān)于事務(wù)控制語言(TCL),哪三個是正確的?
A) rollback without the to savepoint clause undoes all the transaction’s changes, releases its locks, and erases all its savepoints
不帶to savepoint子句的回滾將撤銷事務(wù)的所有更改、釋放其鎖并擦除其所有保存點
C) commit erases all the transaction’s savepoints and releases its locks
commit刪除事務(wù)的所有保存點并釋放其鎖
D) commit ends the transaction and makes all its changes permanebt
提交結(jié)束事務(wù),并使其所有更改永久
16 which two are about virtual columns?
哪兩個是關(guān)于虛擬列的?
A) they can be indexes.
它們可以是索引。
D)they can be referenced in the where clause of an update or delate statement.
它們可以在update或delate語句的where子句中被引用。
17 examine the descroption of the customers table:
檢查客戶表的描述:
which two statements will do an implicit conversion?
哪兩個語句將進行隱式轉(zhuǎn)換?
A) select * from customers where customer_id=‘0001’.
B)select * from customers where insert_date = ‘01-JAN-19’.
18 which two queries return rows for employees whose manager works in a different department?
哪兩個查詢返回經(jīng)理在不同部門工作的員工的行?
C) select emp.* from employees emp join employees mgr on emp.manager_id=mgr.employees_id and emp.department_id < > mgr.department_id;
E) select emp.* from employees emp right join employees mgr on emp.manager_id=mgr.employee_id and emp.department_id < > mgr.department_id where emp.employee_id is not null;
19 which three statements are trun about indexes and their administration in an oracle database?
哪三條語句是關(guān)于索引及其在oracle數(shù)據(jù)庫中的管理的?
A) the same table column can be part of a unique and non-unique index.
同一個表列可以是惟一和非惟一索引的一部分。
B) an index can be created as part of a create table statement.
索引可以作為create table語句的一部分創(chuàng)建。
C) a descending index is a type of function-based index.
降序索引是一種基于函數(shù)的索引。
20 you need to allow user andrew to:
你需要允許用戶安德魯:
1 modify the title and address columns of your customers table
修改客戶表的標題和地址列
2 grant the permission to other users
將權(quán)限授予其他用戶
which statement will do this?
哪個語句可以做到這一點?
A) grant update (title, address) on customer to andrew will grant option.
授權(quán)客戶更新(標題,地址)給安德魯將授權(quán)選項。
=======================================================================================================================================================================================================================
71 部分新題
01 examine the description of the employees tables;
檢查雇員表的描述;
for each employee in department 90 you want to display;
對于90部門的每一位員工,你想要展示;
1、their last name
他們的姓氏
2、the number of complete the number of weeks,starting with the longest serving employee first.
完成的次數(shù)為周數(shù),先從在職時間最長的員工開始。
which statement will accomplish this?
哪一個語句可以完成這個任務(wù)?
C、select last_name, trunc((sysdate hire_date) / /) as tenure from employees
選擇last_name, trunc((sysdate hire_date) / /)作為雇員的保留期
where department_id = 90 order by tenure desc;
其中department_id = 90任期訂單desc;
02 which two are true about unused columns?
關(guān)于未使用的列,哪兩個是正確的?
B、unused columns retaim their data until they are dropped.
未使用的列重新定向它們的數(shù)據(jù),直到它們被刪除。
C、once a column has been set to unused , a new column with the same name can be added to the table.
當一個列被設(shè)置為未使用時,可以將具有相同名稱的新列添加到表中。
03 which two are true about external tables that use the oralce datapump access driver?
關(guān)于使用oralce數(shù)據(jù)池訪問驅(qū)動程序的外部表,哪兩個是正確的?
B、when creating an external, data can be selected from another external table or from a table whose rows are stored in database blocks.
當創(chuàng)建一個外部表時,可以從另一個外部表或從一個表中選擇數(shù)據(jù),該表的行存儲在數(shù)據(jù)庫塊中。
C、creating an external table creates a dump file that can be used by an external table in the same or a different database.
創(chuàng)建外部表將創(chuàng)建一個轉(zhuǎn)儲文件,該文件可由相同或不同數(shù)據(jù)庫中的外部表使用。
04 you create a table named 123.
您創(chuàng)建了一個名為123的表。
which statement runs successfully?
哪條語句運行成功?
B、select * from “123;
B,從“123”中選擇*;
05 examine the despcription of the employees table.
檢查employees表的描述。
which statement will exeute sccessfully ,returning distinct employess with non-null first name ?
哪一種陳述將被刪除,返回不同的雇主與非空的名字?n
A、select distinct * from employees where first_name is not null.
從first_name不為空的雇員中選擇distinct *。
6 which two true about queries using set operators (union, union all, intersect and minus)?
關(guān)于使用集合操作符(union, union all, intersect和minus)的查詢,哪兩個是正確的?
D) the name of each column in the first select list must match the name of the corresponding column in each subsequent select list.
第一個選擇列表中每一列的名稱必須與后面每個選擇列表中對應(yīng)列的名稱相匹配。
E) none of the set operators can be used when selecting CLOB columns.
在選擇CLOB列時,不能使用set操作符。
7 which two are true about using constraints?
關(guān)于使用約束,哪兩個是正確的?
B) a table can have only one primary key but have multiple foreign key constraints.
一個表只能有一個主鍵,但是有多個外鍵約束。
D) a table can have only one primary key and one foreign key constraint.
一個表只能有一個主鍵和一個外鍵約束。
8 you own table departments, referenced by views, indexes, and synonyms.
您擁有由視圖、索引和同義詞引用的表部門。
examine this command wich executes successfully:
檢查該命令執(zhí)行成功:
drop table deparements purge:
drop table deparements清除:
which three statements are true?
哪三種說法是正確的?
A) it wiil remove all views that are based on the departments table.
它將刪除所有基于部門表的視圖。
B) neither can it be rolled back nor can the departments table be recovered.
不能回滾,部門表不能恢復。
F) it wiill remove the deoartments table from the database.
它將從數(shù)據(jù)庫中刪除起訴書表。
9 which two statements are true about current_timestamp?
關(guān)于current_timestamp,哪兩個語句是正確的?
C) it retuns a value of data type timestamp.
返回一個數(shù)據(jù)類型為timestamp的值。
D) it returns the same date as current_date.
它返回與current_date相同的日期。
10 in your session, the nls_format is DD-MM-YYYY.
在您的會話中,nls_format是DD-MM-YYYY。
there are 86400 seconds in a day.
一天有86400秒。
examine this result:
檢查結(jié)果:
date
02-JAN-2020
which statement returns this?
哪條語句返回這個?
E) select to_char(to_date(‘29-10-2019’) + interval ‘2’ month + interval ‘5’ day - interval ‘120’ second, ‘DD-MON-YYYY’) as “date” from dual;
11 which two are true about the precedence of operators and conditions?
關(guān)于運算符和條件的優(yōu)先級,哪兩個是正確的?
B) || has a higher order of precedence than + (addition).
||的優(yōu)先級高于+(加法)。
D) operators are evaluated before conditions.
運算符在條件之前進行評估。
12 which two are true about transactions in the oralce database?
關(guān)于oralce數(shù)據(jù)庫中的事務(wù),哪兩個是正確的?
A) an uncommitted transaction is automatically committed when the user exits sqlplus.
當用戶退出sqlplus時,未提交的事務(wù)將自動提交。
C) a DDL statement issued by session with an uncommitted transaction automatically commits that transaction.
帶有未提交事務(wù)的會話發(fā)出的DDL語句自動提交該事務(wù)。
13 examine the data in the EMP table:
檢查EMP表中的數(shù)據(jù):
you execute this query:
執(zhí)行此查詢:
select deptno as “department”, avg(sal) as averagesalary, max(sal) as “max salary”
選擇deptno作為“部門”,avg(sal)作為平均工資,max(sal)作為“最高工資”
from emp
where sal >= 12000 group by “department” order by averagesalary;
其中sal >= 12000組按“部門”訂單按平均alary;
why does an error occur?
為什么會出現(xiàn)錯誤?
C) an alias name must not contain space characters.
別名不能包含空格字符。
14 which three statements about roles are true?
哪三個關(guān)于角色的陳述是正確的?
B) privileges are assigned to a role using the alter role statement.
使用alter role語句將特權(quán)分配給角色。
D) a role is a named group of related privileges that can only be assigned to a user.
角色是一個指定的相關(guān)特權(quán)組,它只能分配給一個用戶。
G) privileges are assigned to a role using the grant statement.
使用grant語句將特權(quán)分配給角色。
15 you have the privileges to create any type of synonym.
您有創(chuàng)建任何類型的同義詞的特權(quán)。
which statement will create a synonym called EMP for the hcm_employees_records table that is accessible to all users?
哪一條語句將為所有用戶都可以訪問的hcm_employees_records表創(chuàng)建名為EMP的同義詞?
C) create public synonym emp for hcm_employees_records;
為hcm_employees_records創(chuàng)建公共同義詞emp;
16 which three statements are true about indexes and their administration in an oralce database?
關(guān)于索引及其在數(shù)據(jù)庫中的管理,哪三條語句是正確的?
B) an unusable index is maintained when DML is performed on its underlying table.
在底層表上執(zhí)行DML時,會維護一個不可用的索引。
C) an index can be created as part of a create table statement.
索引可以作為create table語句的一部分創(chuàng)建。
E) a descending index is a type of function-based index.
降序索引是一種基于函數(shù)的索引。
17 examine the description of the order_items table:
檢查order_items表的描述:
examine this incomplete query:
檢查這個不完整的查詢:
select distinct quantity * unit_price total_paid from order_items order by ;
which two can replace so the query completes successfully?
哪兩個可以替換<子句>以便查詢成功完成?
C) quantity * unit_price.
E) total_paid.
18 which two statements are true about *_tbales views?
關(guān)于他的觀點,哪兩種說法是正確的?
D) you must have any table system privileges, or be granted object privileges on the tbale, to view a table in dba_tables.
要查看dba_tables中的表,您必須擁有任何表系統(tǒng)特權(quán),或者在tbale上被授予對象特權(quán)。
E) user_tables displlays all tables owned by the current user.
user_tables顯示當前用戶擁有的所有表。
19 examine the description of the employees table:
檢驗員工表的描述:
which two statements will run successfully?
哪兩條語句將成功運行?
A) select ’ the first_name is ’ || first_name || ’ ’ from employees;
B) select ’ the first_naem is ’ ’ ’ || first_name || ’ ’ ’ from employees;
20 which two are true about the nvl, nvl2, and coalesce functions?
關(guān)于nvl、nvl2和合并函數(shù),哪兩個是正確的?
A) coalesce stops evaluating the list of expressions when it finds the first non-null value.
當coalesce找到第一個非空值時,它就停止對表達式列表求值。
E) the first expression in nvl2 is never returned.
nvl2中的第一個表達式永遠不會返回。
21 which three stagtements are true about oracle synonyms?
關(guān)于oracle同義詞,哪三個階段是正確的?
B) a synonym created by one user can refer to an object belonging to another user.
一個用戶創(chuàng)建的同義詞可以引用屬于另一個用戶的對象。
C) a synonym cannot be created for a pl/sql package.
不能為pl/sql包創(chuàng)建同義詞。
E) a sequence can have a synonym.
一個序列可以有一個同義詞。
- 此題答案有問題
22 examine this statement:
審查這句話:
select last_name from employees order by case
按情況從雇員訂單中選擇last_name
where salary=(select max(salary) from employees) then ‘A’ else last_name
end, last_name desc;
which two statement are true?
哪兩種說法是正確的?
C) the names of employees eaming the maximum salary will appear first in ascending order.
包含最高工資的雇員的名字將以升序出現(xiàn)在最前面。
23 which two statemnts execute successfully?
哪兩個狀態(tài)成功執(zhí)行?
B) select to _char(‘2019-dec-25 25:30’ , 'YYYY-MON-DD HH24:MI ', 'NLS_DATK_LANGUAGE = AMERICAN ') from dual;
C) select to_date(TO_CHAR('2019-DEC-25 15:30 ’ ,‘YYYY-MON-DD HH24:MI’ , ‘NLS_DATE_LANGUAGE = AMERICAN’ ) from dual;
24 which tw ostatements are true about an oralce database?
關(guān)于口頭數(shù)據(jù)庫,哪兩項陳述是正確的?
A) a varchar2 column without data has a null value.
沒有數(shù)據(jù)的avarchar2列有空值。
E) a column definition can specify muitiple data types.
列定義可以指定多個數(shù)據(jù)類型。
25 examine these two queries and their output:
檢查這兩個查詢及其輸出:
select deptno, dnamae from dept;
從部門中選擇deptno, dnamae;
now examine this query:
現(xiàn)在檢查這個查詢:
select ename, dname from emp cross join dept
where job = ‘MANAGER’ and dept.deptno in (10 , 20);
How many rows will be displayed?
將顯示多少行?
C) 3
26 which three queries execute successfully?
哪三個查詢成功執(zhí)行?
B) select sysdate - date ‘2019-01-01’ -1 from dual;
C) select (sysdate - date ‘2019-01-01’) /1 from dual;
E) select sysdate - 1 - date ‘2019-01-01’ from dual;
- 此題答案有問題
27 examine the description of the employees table:
檢驗員工表的描述:
which two queries return rows for employees whose manager works in a different department?
哪兩個查詢返回經(jīng)理在不同部門工作的員工的行?
C) select emp.* from employees emp left join employees mgr on emp.manager_id = mgr.employees_id and emp.department_id <> mgr.department_id.
28 examine the data in the new_employees table:
檢查new_employees表中的數(shù)據(jù):
C) merge into employees e using new_employees ne on (e.employee_id = ne.employee_id)
when matched then update set e.name = ne.name, e.jib_id = ne.job_id, e.salary = ne.salary
when not matched then insert values (ne.employee_id, ne_name, ne.job_id, ne.salary);
29 you want to return the current date and time from the user session, with a data type of timestamp with time zone.
您希望從用戶會話返回當前日期和時間,數(shù)據(jù)類型為帶有時區(qū)的時間戳。
which function will do this?
哪個函數(shù)可以做到這一點?
D) current_timestamp
30 which statement will execute successfully?
哪條語句將成功執(zhí)行?
B) select 2 from dual union select 3, 4 from dual order by 1, 2;
從對偶集中選擇2,從對偶序中選擇3,4;
31 examine the description of the employees table:
檢查員工表的描述:
which statement will fail?
哪個語句會失敗?
D) selelct department_id, count() from employees where department_id <> 90 group by department_id having count() >= 3;
32 examine this statement:
32審查這一陳述:
create table orders (
serial_no number unique,
order_id number primary key,
order_date date not null,
status varchar2(10) check (status in (‘credit’ , ;cash’)),
product_id number references products (product_id),
order _total number);
On which two columns of the table will an index be created automatically?
將在表的哪兩列上自動創(chuàng)建索引?
C) product_id
E) order_id
33 you need to allow user andrew to:
你需要允許用戶安德魯: 1 modify the title and address columns of your customers
table. 修改客戶表的標題和地址列。 2 grant that permission to other users.
將該權(quán)限授予其他用戶。 which statement will do this? 哪個語句可以做到這一點? B) grant update
(title, address) on customers to andrew with grante option;
向andrew授予客戶更新(頭銜、地址)的權(quán)利;
34 examine the descriptiom of the employees table:
檢查員工表的描述:
which two queries will result in an error?
哪兩個查詢會導致錯誤?
B) select last_name , 12 * salary as annual_salary from employees
where annual_salary > 100000 order by annual_salary;
F) select last_name , 12 * salary as annual_salary from employees
where annual_salary >100000 order by 12 * salary;
35 examine the descriptiom of the books table:
檢查書表的描述:
which two statements are true ?
哪兩種說法是正確的?
B) the second rollback command replays the delate.
第二個回滾命令重放了延遲。
E) the first rollback command restores the 101 rows that were delete and commits the inserted row.
第一個回滾命令恢復被刪除的101行,并提交插入的行。
36 examine the description of the bricks table:
檢查磚桌的描述:
which two queries execute successfully?
哪兩個查詢成功執(zhí)行?
B) select shape, color from bricks minus selelct color, shape from bricks-stage;
D) select bricks_id, shape from bricks minus select weight, color from bricks_stage;
37 不確定答案
38 examine the decription of the employees table:
檢驗員工表的表述:
which two queries return all rows for employees whose salary is greater than the average salary in thelr department?
哪兩個查詢返回工資大于該部門平均工資的員工的所有行?
A) select * from employees e1 where salary > ( select avg(salary) from amployees e2
where e1.department_id = e2.department_id );
D) select * from (select e*, avg(salary) over ( partition by department_id) avg_sal
from employees e) where salary > avg_sal;
總結(jié)
以上是生活随笔為你收集整理的OCP12C题库,71sql的使用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: OCP12C题库,63数据库管理( Ad
- 下一篇: 12C OCP 1Z0-063 题库(8