移动端

  • 题王微信公众号

    题王微信公众号

    微信搜“题王网”真题密题、最新资讯、考试攻略、轻松拿下考试

计算机考试 | Oracle认证考试

模式切换

0 0 0
我的错题 我的收藏 学习笔记

章节目录

单选题 Examine the structure of the EMPLOYEES table: Column name Data type Remarks EMPLOYEE_ID NUMBER NOT NULL, Primary Key LAST_NAME VARCNAR2(30) FIRST_NAME VARCNAR2(30) JOB_ID NUMBER SAL NUMBER MGR_ID NUMBER References EMPLOYEE_ID column DEPARTMENT_ID NUMBER You need to create an index called NAME_IDX on the first name and last name fields of the EMPLOYEES table. Which SQL statement would you use to perform this task?()

A

CREATE INDEX NAME _IDX (first_name, last_name);

B

CREATE INDEX NAME _IDX (first_name, AND last_name)

C

CREATE INDEX NAME_IDX ON (First_name, last_name);

D

CREATE INDEX NAME_IDX ON employees (First_name, AND last_name);

E

CREATE INDEX NAME_IDX ON employees (First_name, last_name);

F

CREATE INDEX NAME_IDX FOR employees (First_name, last_name);

单选题 User Mary has a view called EMP_DEPT_LOC_VU that was created based on the EMPLOYEES, DEPARTMENTS, and LOCATIONS tables. She has the privilege to create a public synonym, and would like to create a synonym for this view that can be used by all users of the database.Which SQL statement can Mary use to accomplish that task?()

A

CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu

B

CREATE PUBLIC SYNONYM EDL:VU FOR mary (emp_dept_loc_vu);

C

CREATE PUBLIC SYNONYM EDL_VU FOR emp _dept_loc_vu;

D

CREATE SYNONYM EDL_VU ON emp_dept_loc_vu FOR EACH USER;

E

CREATE SYNONYM EDL_VU FOR EACH USER ON emp_dept_loc_vu

F

CREATE PUBLIC SYNONYM EDL_VU ON emp_dept_loc_vu FOR ALL USERS;

多选题 Which three statements about subqueries are true? ()

A

A main query can have more than one subquery.

B

A subquery can have more than one main query.

C

The subquery and main query must retrieve data from the same table.

D

The subquery and main query can retrieve data from different tables.

E

Only one column or expression can be compared between the subquery and main query.

F

Multiple columns or expression can be compared between the subquery and main query.

多选题 Which two statements are true about constraints? ()

A

The UNIQUE constraint does not permit a null value for the column.

B

A UNIQUE index gets created for columns with PRIMARY KEY and UNIQUE constraints.

C

The PRIMARY KEY and FOREIGN KEY constraints create a UNIQUE index.

D

The NOT NULL constraint ensures that null values are not permitted for the column.

单选题 What is necessary for your query on an existing view to execute successfully?()

A

The underlying tables must have data.

B

You need SELECT privileges on the view.

C

The underlying tables must be in the same schema.

D

You need SELECT privileges only on the underlying tables.

单选题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) SAL NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You want to create a SQL script file that contains an INSERT statement. When the script is run, the INSERT statement should insert a row with the specified values into the EMPLOYEES table. The INSERT statement should pass values to the table columns as specified below: EMPLOYEE_ID: Next value from the sequence EMP_ID_SEQ EMP_NAME and JOB_ID: As specified by the user during run time, through substitution variables SAL: 2000 MGR_ID: No value DEPARTMENT_ID: Supplied by the user during run time through substitution variable. The INSERT statement should fail if the user supplies a value other than 20 or 50. Which INSERT statement meets the above requirements?()

A

INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

B

INSERT INTO employees VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did IN (20,50));

C

INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50)) VALUES  (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

D

INSERT INTO (SELECT * FROM employees WHERE department_id IN (20,50) WITH CHECK OPTION) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

E

INSERT INTO (SELECT * FROM employees WHERE (department_id = 20 AND department_id = 50) WITH CHECK OPTION ) VALUES (emp_id_seq.NEXTVAL, '&ename', '&jobid', 2000, NULL, &did);

单选题 You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty. Which statement accomplishes this task?()

A

ALTER TABLE students ADD PRIMARY KEY student_id;

B

ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);

C

ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;

D

ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

E

ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);

单选题 Examine the structure of the EMPLOYEES table: EMPLOYEE_ID NUMBER NOT NULL EMP_NAME VARCHAR2(30) JOB_ID VARCHAR2(20) DEFAULT 'SA_REP' SAL NUMBER COMM_PCT NUMBER MGR_ID NUMBER DEPARTMENT_ID NUMBER You need to update the records of employees 103 and 115. The UPDATE statement you specify should update the rows with the values specified below: JOB_ID: Default value specified for this column definition. SAL: Maximum salary earned for the job ID SA_REP. COMM_PCT: Default value specified for this commission percentage column, if any. If no default value is specified for the column, the value should be NULL. DEPARTMENT_ID: Supplied by the user during run time through substitution variable. Which UPDATE statement meets the requirements?()

A

UPDATE employees SET job_id = DEFAULT AND Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') AND comm_pct = DEFAULT AND department_id = &did WHERE employee _id IN (103,115);

B

UPDATE employees SET job_id = DEFAULT AND Sal = MAX(sal) AND comm_pct = DEFAULT OR NULL AND department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';

C

UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP'), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115);

D

UPDATE employees SET job_id = DEFAULT, Sal = MAX(sal), comm_pct = DEFAULT, department_id = &did WHERE employee_id IN (103,115) AND job _ id = 'SA_ REP';

E

UPDATE employees SET job_id = DEFAULT, Sal = (SELECT MAX(sal) FROM employees WHERE job_id = 'SA_REP') comm_pct = DEFAULT OR NULL, department_id = &did WHERE employee_id IN (103,115);

单选题 The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()

A

Column definitions cannot be altered to add DEFAULT values.

B

A change to the DEFAULT value affects only subsequent insertions to the table.

C

Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.

D

All the rows that have a NULL value for the SALARY column will be updated with the value 5000.

单选题 Which SQL statement defines the FOREIGN KEY constraint on the DEPTNO column of the EMP table?()

A

CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) NOT NULL CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);

B

CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

C

CREATE TABLE EMP (empno NUMBER(4) ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));

D

CREATE TABLE EMP (empno NUMBER(4), ename VARCNAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));

最新资讯

首页 上一页 1 2 3 4 5 下一页 尾页 /

到第