Upwork ORACLE SQL 9I TEST 2016

Hello Freelancer, Welcome to allupworktestanswers.com Here to get the ORACLE SQL 9I TEST of Latest version 2016. We are ready here to provide your desire upwork test answer. We already tested all exam test information Available include on here. So Dear, Why Late? Read the below full exam test and get more information from our website. 
Upwork ORACLE SQL 9I TEST 2016

1. Which of the following constitute the correct guidelines for naming database tables?

Answers:
  1. Must begin with either a number or letter
  2. Must be 1-30 characters long
  3. Should not be an Oracle Server reserved word
  4. Must contain only A-Z, a-z, 0-9, _,*, and #
  5. Must contain only A-Z, a-z, 0-9, _, $, and #
  6. Must begin with a letter
2. Which of the following are DML statements?
Answers:
  1. COMMIT
  2. MERGE
  3. UPDATE
  4. DELETE
  5. CREATE
  6. DROP
3. An outer join is used when:
Answers:
  1. The tables being joined have NOT NULL columns
  2. The tables being joined have only matched data.
  3. The columns being joined have NULL values
  4. The tables being joined have only unmatched data
  5. The tables being joined have both matched and unmatched data
4. Which of the following components are required to run iSQL*plus on PC?
Answers:
  1. SQL*PLUS installed on the PC
  2. HTTP Server
  3. Oracle net on PC
  4. iSQL*PLUS Server
5. Which of the following constitute the attributes of /SQL*Plus?
Answers:
  1. /SQL*Plus commands cannot be abbreviated
  2. /SQL*Plus commands are accessed from a browser
  3. /SQL*Plus commands are used to manipulate data in tables
  4. /SQL*Plus commands manipulate table definitions in the database
  5. /SQL*Plus is the Oracle proprietary interface for executing SQL statements
6. Which component is a literal in the following select statement?
Select ‘Emp name :’||ename from emp where deptno=20;
Answers:
  1. ename
  2. 20
  3. Emp name:
  4. ||
7. Which of the following statements is a complete transaction?
Answers:
  1. DELETE employees;
  2. DESCRIBE employees;
  3. ROLLBACK TO SAVEPOINT C;
  4. GRANT SELECT ON employees TO SCOTT;
  5. ALTER TABLE employees SET UNUSED COLUMN sal;
8. Which of the following tasks can be performed by using the TO_CHAR function?
Answers:
  1. Convert ’10’to 10
  2. Convert 10 to ’10’
  3. Convert ‘TEN’ to 10
  4. Convert a date to a character expression
  5. Convert a character expression to a date
9. What kinds of commands can you enter at the command prompt in 9i Sql Plus?
Answers:
  1. PL/SQL Blocks
  2. SQL*Plus commands
  3. Security commands
  4. SQL commands
10. Which of the following statements are correct with regard to WHERE and HAVING clauses?
Answers:
  1. A WHERE clause can be used to restrict both rows and groups
  2. A WHERE clause can be used to restrict rows only
  3. A HAVING clause can be used to restrict both rows and groups
  4. A HAVING clause can be used to restrict groups only
  5. A HAVING clause CANNOT be used in Subqueries
11. Examine the description of the STUDENTS table:
STD_ID NUMBER (4)
COURSE_ID VARCHAR2 (10)
START_DATE DATE
END_DATE DATE
The aggregate functions valid on the START_DATE columns are:
Answers:
  1. SUM(start_date)
  2. AVG(start_date)
  3. COUNT(start_date)
  4. AVG(start_date, end_date)
  5. MIN(start_date)
12. Examine the data in the EMPLOYEES table given below:
LAST_NAME �DEPARTMENT_ID SALARY
ALLEN 10 3000
MILLER 20 1500
King 20 2200
Davis 30 5000
Which of the following Subqueries work?
Answers:
  1. SELECT * FROM employees where salary > (SELECT MIN(salary) FROM employees GROUP BY
  2. partment_id);
  3. SELECT * FROM employees WHERE salary = (SELECT AVG(salary) FROM employees GROUP BY
  4. partment_id);
  5. SELECT distinct department_id FROM employees Where salary > ANY (SELECT AVG(salary) FROM employees GROUP BY department_id);
  6. SELECT department_id FROM employees WHERE SALARY > ALL (SELECT AVG(salary) FROM employees GROUP BY department_id);
  7. SELECT department_id FROM employees WHERE salary > ALL (SELECT AVG(salary) FROM employees GROUP BY AVG(SALARY));
13. You have to calculate the value 12* salary* commission_pct for all the employees in the EMP table. Which of the following statements ensures that a value is displayed in the calculated column for all the employees?
Answers:
  1. SELECT last_name, 12 * salary* commission_pct FROM emp;
  2. SELECT last_name, 12 * salary* (commission_pct,0) FROM emp;
  3. SELECT last_name, 12 * salary* (nvl(commission_pct,0) )FROM emp;
  4. SELECT last_name, 12 * salary* (decode(commission_pct,0)) FROM emp;
14. Evaluate the following SQL statement:
SELECT e.employee_id, (.15* e.salary) + (.5 * e.commission_pct) + (s.sales_amount * (.35 * e.bonus)) AS CALC_VALUE FROM employees e, sales s WHERE e.employee_id = s.emp_id;
What will happen if all the parentheses are removed from the calculation?
Answers:
  1. The value displayed in the CALC_VALUE column will be lower
  2. The value displayed in the CALC_VALUE column will be higher
  3. There will be no difference in the value displayed in the CALC_VALUE column
  4. An error will be reported
15. Which of the following is an iSQL*Plus command?
Answers:
  1. INSERT
  2. UPDATE
  3. SELECT
  4. DESCRIBE
  5. DELETE
16. Examine the code given below:
SELECT employee_id FROM employees WHERE commission_pct=.5 OR salary > 23000
Which of the following statement is correct with regard to this code?
Answers:
  1. It returns employees who have 50% of the salary greater than $23,000:
  2. It returns employees who have 50% commission rate or salary greater than $23,000:
  3. It returns employees who have 50% of salary less than $23,000:
  4. None of the above
17. Examine the two SQL statements given below:
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY salary DESC;
SELECT last_name, salary, hire_date FROM EMPLOYEES ORDER BY 2 DESC;
What is true about them?
Answers:
  1. The two statements produce identical results
  2. The second statement returns a syntax error while first will be executed successfully
  3. The second statement will return top 2 records having maximum salary, while first statement will return all records
  4. There is no need to specify DESC because the results are sorted in descending order by default
18. What will happen if you query the emp table shown below:
select empno,DISTINCT ename,Salary from emp;
Answers:
  1. EMPNO ,unique value of ENAME and then SALARY are Displayed.
  2. EMPNO ,unique value of the two columns, ENAME and salary are displayed.
  3. DISTINCT is not a valid keyword in SQL.
  4. No values will be displayed because the statement will return an error
19. How many join conditions should be there to avoid a Cartesion Join for joining three tables?
Answers:
  1. 1
  2. 2
  3. 3
  4. None of the above
20. Which operator will be evaluated first in the statement:
select (2+3*4/2-8) from dual:
Answers:
  1. +
  2. /
  3. *
21. Which of the following SQL statements returns a numeric value?
Answers:
  1. SELECT ADD_MONTHS(MAX (hire_date), 6) FROM EMP;
  2. SELECT ROUND(hire_date)FROM EMP;
  3. SELECT sysdate-hire_date FROM EMP;
  4. SELECT TO_NUMBER(hire_date + 7)FROM EMP;
22. Which of the following substitution variables should be used to reuse the variable value without prompting the user each time?
Answers:
  1. &
  2. ACCEPT
  3. PROMPT
  4. &&
23. Which of the following SELECT statements will get the result ‘elloworld’ from the string ‘HelloWorld’?
Answers:
  1. SELECT SUBSTR (‘HelloWorld’,1) FROM dual;
  2. SELECT INITCAP(TRIM(‘HellowWorld’, 1,1) FROM dual;
  3. SELECT LOWER (SUBSTR (‘HellowWorld’, 2,1) FROM dual;
  4. SELECT LOWER (TRIM (‘H’ FROM ‘HelloWorld’)) FROM dual;
24. You want to list names of the employees who have been with the company for more than five years. Which of the following SQL statements will display the required results?
Answers:
  1. SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE>5
  2. SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE > 5
  3. SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)/365 > 5
  4. SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)* 365 > 5
25. Examine the structure of the STUDENTS table given below:
STUDENT_ID �NUMBER �NOT NULL, Primary Key
STUDENT_NAME VARCHAR2 (30)
COURSE_ID VARCHAR2 (10) NOT NULL
MARKS NUMBER
START_DATE DATE
FINISH_DATE DATE
You need to create a report of ten students who achieved the highest ranking in the course INT_SQL and completed the course in the year 1999.
Which of the following SQL statements accomplishes this task?
Answers:
  1. SELECT student_id, marks, ROWNUM “Rank” FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′ AND course_id = ‘INT_SQL’ORDER BY marks DESC;
  2. SELECT student_id, marks, ROWID “Rank” FROM students WHERE ROWID <= 10 AND finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99’AND course_id = ‘INT_SQL’ORDER BY marks;
  3. SELECT student_id, marks, ROWNUM “Rank” FROM (SELECT student_id, marks FROM students WHERE ROWNUM <= 10 AND finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′ AND course_id = ‘INT_SQL’ ORDER BY marks DESC);
  4. SELECT student_id, marks, ROWNUM “Rank” FROM (SELECT student_id, marks FROM students WHERE finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′ AND course_id = ‘INT_SQL’ ORDER BY marks DESC)WHERE ROWNUM <= 10 ;
  5. SELECT student_id, marks, ROWNUM “Rank” FROM (SELECT student_id, marks FROM students ORDER BY marks) WHERE ROWNUM <= 10 AND finish_date BETWEEN ’01-JAN-99′ AND ’31-DEC-99′ AND course_id = ‘INT_SQL’;
26. Which of the following views should a user query to display the columns associated with the constraints on a table owned by the user?
Answers:
  1. USER_CONSTRAINTS
  2. USER_OBJECTS
  3. ALL_CONSTRAINTS
  4. USER_CONS_COLUMNS
  5. USER_COLUMNS
27. What does the TRUNCATE statement do?
Answers:
  1.  Removes the table
  2. Removes all rows from a table
  3. Shortens the table to 10 rows
  4. Removes all columns from a table
28. Top N analysis requires _____ and _____.
Answers:
  1.  The use of rowed & Only an inline view
  2. a GROUP BY clause & Only an inline view
  3. an ORDER BY clause & An inline view and an outer query
  4. None of the above
29. Which data dictionary view holds information about the column in a view?
Answers:
  1. USER_VIEWS
  2. USER_VIEW_COLUMNS
  3. USER_TAB_COLUMNS
  4. USER_ALL_COLUMNS
30. Which of the following SELECT statements should be used to extract the year from the system date to display it in the format “2001”?
Answers:
  1. SELECT TO_CHAR(SYSDATE, ‘yyyy’) FROM dual;
  2. SELECT TO_DATE(SYSDATE, ‘yyyy’) FROM dual;
  3. SELECT DECODE(SUBSTR(SYSDATE, 8), ‘YYYY’) FROM dual;
  4. SELECT DECODE(SUBSTR(SYSDATE, 8), ‘year’) FROM dual;
  5. SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),’yyyy’) FROM dual;
31. You want to display the titles of books that meet the following criteria:
1. Purchased before Feb 21, 2002
2. Price is less than $500 or greater than $900
You want to sort the result by the date of purchase, starting with the most recently bought book.
Which of the following statements should you use?
Answers:
  1. SELECT book_title FROM books WHERE price between 500 and 900 AND purchase_date < ’21-FEB-2002′ ORDER BY purchase_date;
  2. SELECT book_title FROM books WHERE price IN (500, 900) AND purchase_date < ’21-FEB-2002′ ORDER BY purchase date ASC;
  3. SELECT book_title FROM books WHERE price < 500 OR > 900 AND purchase_date DESC;
  4. SELECT Book_title FROM books WHERE (price < 500 OR price > 900) AND purchase_date < ’21-FEB-2002′ ORDER BY purchase_date DESC;
32. Which of the following SQL statements accepts user input for the columns to be displayed, table name, and the WHERE condition?
Answers:
  1. SELECT &1, “&2″FROM &3 WHERE last_name = ‘&4’;
  2. SELECT &1, ‘&2’ FROM &3 WHERE ‘&last_name = ‘&4”;
  3. SELECT &1, &2 FROM &3 WHERE last_name = ‘&4’;
  4. SELECT &1, ‘&2’ FROM EMP WHERE last_name = ‘&4’;
33. Where is the GROUP BY clause statement placed in a SELECT statement that includes a WHERE clause?
Answers:
  1. Immediately after the SELECT clause
  2. Before the WHERE clause
  3. After the ORDER BY clause
  4. After the WHERE clause
34. Evaluate the SQL statement given below:
SELECT ROUND (45.953, -1), TRUNC (45.936, 2) FROM dual;
Which of the following values are displayed?
Answers:
  1. 46 and 45.93
  2. 50 and 45.93
  3. 50 and 45.9
  4. 45 and 45.93
  5. 45.95 and 45.93
35. Which of the following data types stores data outside the Oracle database?
Answers:
  1. UROWID
  2. BFILE
  3. BLOB
  4. NCLOB
  5. EXTERNAL
36. Which of the following statements are correct with regard to NULL values?
Answers:
  1. Only =and !=operator can be used to search for NULL values in a column
  2. In an ascending order sort, NULL values appear at the bottom of the result set
  3. Both a and b
  4. Neither a nor b
37. Which of the following operations cannot be performed using the ALTER TABLE statement?
Answers:
  1. Rename table
  2. Rename column
  3. Drop column
  4. Drop NOT NULL Constraint
38. Which of the following constraints can be defined only at the column level?
Answers:
  1. UNIQUE
  2. NOT NULL
  3. CHECK
  4. PRIMARY KEY
  5. FOREIGN KEY
39. Which of the following SQL statements defines a FOREIGN KEY constraint on the DEPT NO column of the EMP table?
Answers:
  1. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);
  2. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));
  3. CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));
  4. CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));
40. Which of the following shows the correct use of the Trunc command on a date?
Answers:
  1. TRUNC=To_Date(’09-Jan-02,DD-MON-YY,’YEAR’,”Date” from Dual;
  2. Select TRUNC(To_Date(’09-Jan-02,DD-MON-YY,YEAR’)) “DATE” from Dual;
  3. Date =TRUNC(To_DATE(’09-Jan-02′,’DD-MON-YY’),’YEAR’),’YEAR)”DATE: from DUAL;
  4. SELECT TRUNC(TO_DATE(’12-Feb-99′,’DD-MON-YY’), ‘YEAR’) “Date ” FROM DUAL;
41. Which type of join will you write to perform an outer join of tables A and B that returns all rows from B-:
Answers:
  1. Any outer join
  2. A left outer join
  3. A cross join
  4. A right outer join
  5. An inner join
42. You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.
Which of the following statements will accomplish this task?
Answers:
  1. ALTER TABLE students ADD PRIMARY KEY student_id;
  2. ALTER TABLE students ADD CONSTRAINT PRIMARY KEY (student_id);
  3. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY student_id;
  4. ALTER TABLE students ADD CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
  5. ALTER TABLE students MODIFY CONSTRAINT stud_id_pk PRIMARY KEY (student_id);
43. Which of the following SQL statements should be used to remove a view called EMP_DEPT_VU from the schema?
Answers:
  1. DROP emp_dept_vu;
  2. DELETE emp_dept_vu;
  3. REMOVE emp_dept_vu;
  4. DROP VIEW emp_dept_vu;
  5. DELETE VIEW emp_dept_vu;
  6. REMOVE VIEW emp_dept_vu;
44. _______ operator can be used with a multiple row subquery.
Answers:
  1. =
  2. LIKE
  3. BETWEEN
  4. NOT IN
  5. Is
45. The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER (12)
SEMESTER_END DATE
GPA NUMBER (4, 3)
Which of the following statements finds the highest Grade Point Average (GPA) per semester?
Answers:
  1. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
  2. SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
  3. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;
  4. SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;
  5. SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;


Finally no more words require about the ORACLE SQL 9I TEST  information in this session of this content. If you are require knowing more, Please ask to us via our contact us form or comment box. Please make sure that, you don’t send Personal information via the Comment box.  Thank you very mutch for being with us.

0 comments: