Quiz
Oracle Surprise Bag
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (12)
1Which two statements are true about WHERE and HAVING clauses?
(Choose two)- AA WHERE clause can be used to restrict rows only.
- BA WHERE clause CANNOT be used in a query of the query uses a HAVING clause.
- CA WHERE clause can be used to restrict both rows and groups.
- DA HAVING clause can be used to restrict groups only.
- EA HAVING clause CANNOT be used in sub queries.
- FA HAVING clause can be used to restrict both rows and groups.
2What are the distinguishing characteristics of a public synonym rather than a private synonym?
(Choose two correct answers.)- APublic synonyms can be accessed by name without a schema name qualifier.
- BPublic synonyms can have the same names as tables or views.
- CPublic synonyms can be selected from without needing any permissions.
- DPublic synonyms are always visible to all users.
3You have a large job that will load many thousands of rows into your ORDERS table. To speed up the loading process, you want to temporarily stop enforcing the foreign key constraint FK_ORDERS.
Which of the following statements will satisfy your requirement?- AALTER TABLE ORDERS DISABLE FOREIGN KEY FK_ORDERS;
- BALTER TABLE ORDERS DISABLE ALL CONSTRAINTS;
- CALTER CONSTRAINT FK_ORDERS DISABLE;
- DALTER TABLE ORDERS DISABLE CONSTRAINT FK_ORDERS;
4Examine the structure of the EMPLOYEES table:
EMPLOYEE_ID NUMBER NOT NULL, Primary Key
EMP_NAME VARCHAR2(30)
JOB_ID NUMBER\\
SAL NUMBER
MGR_ID NUMBER . References EMPLOYEE_ID column
DEPARTMENT_ID NUMBER . Foreign key to DEPARTMENT_ID column of the. . DEPARTMENTS table
You created a sequence called EMP_ID_SEQ in order to populate sequential values for the EMPLOYEE_ID column of the EMPLOYEES table.
Which two statements regarding the EMP_ID_SEQ sequence are true?
(Choose two.)- AThe EMP_ID_SEQ sequence is invalidated when you modify the EMPLOYEE_ID column.
- BThe EMP_ID_SEQ sequence is not affected by modifications to the EMPLOYEES table.
- CYou cannot use the EMP_ID_SEQ sequence to populate the JOB_ID column.
- DThe EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEE_ID column.
- EAny other column of NUMBER data type in your schema can use the EMP_ID_SEQ sequence.
- FThe EMP_ID_SEQ sequence is dropped automatically when you drop the EMPLOYEES table.
5What will happen if you query the EMP table shown below with the following?
--------------------------
EMP Table
--------------------------
Column Datatype Length
--------------------------
EMPNO NUMBER 4
ENAME VARCHAR2 30
SALARY NUMBER 14,2
COMM NUMBER 10,2
DEPTNO NUMBER 2
--------------------------
SELECT empno, DISTINCT ename, salary
FROM emp;- ANo values will be displayed because the statement will return an error.
- BDISTINCT is not a valid keyword in SQL.
- CEMPNO and unique values of the two columns, ENAME and SALARY, are displayed.
- DEMPNO, unique values of ENAME, and then SALARY are displayed.
6Evaluate the SQL statement DROP TABLE DEPT:
Which four statements are true of the SQL statement?
(Choose four)- AAll indexes based on the DEPT table are dropped.
- BAll data in the table is deleted, but the structure of the table is retained.
- CAll data in the table is deleted, and the table structure is also deleted.
- DYou cannot roll back this statement.
- EAll synonyms based on the DEPT table are deleted.
- FAll views based on the DEPT table are deleted.
- GAll pending transactions are committed.
7If an UPDATE or DELETE command has a WHERE clause that gives it a scope of several rows, what will happen if there is an error part way through execution?
The command is one of several in a multistatement transaction.
(Choose the best answer.)- AWhatever work the command had done before hitting the error will be rolled back, but work done already by the transaction will remain.
- BThe command will stop at the error, and the rows that have been updated or deleted will remain updated or deleted.
- CThe command will skip the row that caused the error and continue.
- DThe whole transaction will be rolled back.
8Read the following two statements, and choose the best option.
1. A HAVING clause should always appear after the GROUP BY clause.
2. A GROUP BY clause should always appear after the WHERE clause.- AStatement 1 is false, and statement 2 is true.
- BStatement 1 is true, and statement 2 is false.
- CStatement 1 and 2 are false.
- DStatements 1 and 2 are true.
9Which of the following statements are syntactically correct?
(Choose all that apply.)- ANone of the above
- BSELECT * FROM EMPLOYEES E JOIN DEPARTMENTS D USING (DEPARTMENT_ID);
- CSELECT * FROM EMPLOYEES JOIN DEPARTMENTS D USING (D.DEPARTMENT_ID);
- DSELECT D.DEPARTMENT_ID FROM EMPLOYEES JOIN DEPARTMENTS D USING (DEPARTMENT_ID);
10Which statement is true regarding the default behavior of the order by clause?
- AOnly those columns that are specified in the select list can be used in the order by clause.
- BNumeric values are displayed from the maximum to the minimum value if they have decimal positions.
- CIn a character sort, the values are case-sensitive.
- DNULL values are not considered at all by the sort operation.
11Examine the data in the CUSTOMERS table:
CUSTNO CUSTNAME CITY
1 KING SEATTLE
2 GREEN BOSTON
3 KOCHAR SEATTLE
4 SMITH NEW YORK
You want to list all cities that have more than one customer along with the customer details.
Evaluate the following query:
SQL>SELECT c1.custname, c1.city
FROM Customers c1 __________________ Customers c2
ON (c1.city=c2.city AND c1.custname<>c2.custname);
Which two JOIN options can be used in the blank in the above query to give the correct output?
(Choose two.)- AFULL OUTER JOIN
- BRIGHT OUTER JOIN
- CLEFT OUTER JOIN
- DNATURAL JOIN
- EJOIN
12The DBA unknowingly terminated the process ID belonging to the PMON process of Oracle Database 12c database using the kill -9 command on Unix.
- AOracle spawns another PMON process automatically.
- BIf the database is in ARCHIVELOG mode, Oracle automatically starts another PMON process and recovers from the database hang.
- CThe database hangs, and the DBA must manually start a PMON process.
- DThe instance crashes and needs to be restarted.
Information
- Description
- Quiz on Oracle Surprise Bag, created by Brandon Gagon on 07/05/2019.
- Author
- Brandon Gagon
- Language
- English
- Views
- 3
- Rating
- No ratings yet Rate this quiz