1. You are formulating a SQL statement to retrieve data from Oracle.
Which of the following statement are invalid A. select NAME, Jersey_No where Jersey_No = 6; B. select NAME, Jersey_No from PLAYERS; C. select * from PLAYERS where Jersey_No = 6; D. select Jersey_No from PLAYERS; 2. You are procesing some data changes in your SQL*Plus session as part of one transaction. Which of the following choices does not typically indicate the end of a transaction? A. Issuing an update statement B. Issuing a commit statement C. Issuing a rollback statement D. Ending your session 3. You have just removed 1,700 rows from a table that were no longer needed. In order to save the changes you've made to database, which of the following statements are used? A. savepoint B. commit C. rollback D. set transaction 4. You issue a select statement on the BANK_ACCT table containing the order by clause. Which of the following uses of the order by clause would produce an error? A. order by acctno DESC; B. order by 1; C. order by sqrt(1); D. order by acctno ASC 5. You issue the following statement: SELECT DECODE(ACCTNO, 123456, 'CLOSED', 654321, 'SEIZED', 590395, 'TRANSFER', 'ACTIVE') FROM BANK_ACCT; If the value for ACCTNO is 503953, what information will this statement display? A. ACTIVE B. TRANSFER C. SEIZED D. CLOSED 6. You are entering several dozen rows of data into the BANK_ACCT table. Which of the following statements will enable you to execute the same statement again and again, entering different values for variables at statement runtime? A. insert into BANK_ACCT (ACCTNO, NAME) VALUES (123456, 'SMITH'); B. insert into BANK_ACCT(ACCTNO, NAME) VALUES ( VAR1, VAR2); C. insert into BANK_ACCT(ACCTNO, NAME) VALUES (&VAR1, '&VAR2'); D.insert into BANK_ACCT(select ACCTNO, NAME from EMP_BANK_ACCTS);
7. Table EMP has 17,394,430 rows in it. You issue a delete from emp statement, followed by a commit. Then, you issue a select count(*) to find out how many rows there are in the table. Several minutes later, Oracle returns 0. Why did it so long for Oracle to obtain this information? A. The table was no empty. B. The high-water mark was no reset. C. Oracle always performs slowly after a commit is issued. D. The table data did not exist to be counted anymore. 8. Review the following transcript of a SQL*Plus session: INSERT INTO INVENTORY (UPC_CODE, PRODUCT) VALUES (503949353, 'HAZELNUT COFFEE'); INSERT INTO INVENTORY(UPC_CODE, PRODUCT) VALUES (593923506, 'SKIM MILK'); INSERT INTO INVENTORY (UPC_CODE, PRODUCT) VALUES (402392340,'CANDY BAR'); SAVEPOINT INV1 UPDATE INVENTORY SET UPC_CODE = 50393950 WHERE UPC_CODE=402392340; UPDATE INVENTORY SET UPC_CODE=4104930504 WHERE UPC_CODE=402392340; COMMIT; UPDATE INVENTORY SET PRODUCT = ( SELECT PRODUCT FROM INVENTORY WHERE UPC_CODE = 50393950) WHERE UPC_CODE = 593923506; ROLLBACK; Which of the following UPC codes will not have records in the INVENTORY table as a result of this series of operations? A. 593923506 B. 503949353 C. 4104930504 D. 50393950 9. You have a group of values from a column in a table, and you would like to perform a group operation on them. Each of the following functions operate on data from all rows as a group, except for which of the following choices? A. avg() B. sqrt() C. count() D. stddev() 10. You have a situation where you need to use the nvl() function. All the following statement about the nvl() functions are true except one. Which is it? A. nvl() returns the second value passed if the first values is null. B. nvl() handles values of many different datatypes. C. nvl() return NULL if the first value is not equal to the second. D. Both the values passed for nvl() must be the same datatypes.