1. Question: Which operator will be evaluated first in the statement: select (2+3*4/2-8) from dual:

    A
    +

    B
    -

    C
    /

    D
    *

    Note: Not available
    1. Report
  2. Question: Which of the following SQL statements returns a numeric value?

    A
    SELECT ADD_MONTHS(MAX (hire_date), 6) FROM EMP;

    B
    SELECT ROUND(hire_date)FROM EMP;

    C
    SELECT sysdate-hire_date FROM EMP;

    D
    SELECT TO_NUMBER(hire_date + 7)FROM EMP;

    Note: Not available
    1. Report
  3. Question: Which of the following SELECT statements will get the result 'elloworld' from the string 'HelloWorld'?

    A
    SELECT SUBSTR ('HelloWorld',1) FROM dual;

    B
    SELECT INITCAP(TRIM('HellowWorld', 1,1) FROM dual;

    C
    SELECT LOWER (SUBSTR ('HellowWorld', 2,1) FROM dual;

    D
    SELECT LOWER (TRIM ('H' FROM 'HelloWorld')) FROM dual;

    Note: Not available
    1. Report
  4. Question: 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?

    A
    SELECT ENAME FROM EMP WHERE SYSDATE-HIRE_DATE>5

    B
    SELECT ENAME FROM EMP WHERE HIRE_DATE-SYSDATE > 5

    C
    SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)/365 > 5

    D
    SELECT ENAME FROM EMP WHERE (SYSDATE-HIRE_DATE)* 365 > 5

    Note: Not available
    1. Report
  5. Question: 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?

    A
    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;

    B
    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;

    C
    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);

    D
    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 ;

    E
    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';

    Note: Not available
    1. Report
  6. Question: Which of the following views should a user query to display the columns associated with the constraints on a table owned by the user?

    A
    USER_CONSTRAINTS

    B
    USER_OBJECTS

    C
    ALL_CONSTRAINTS

    D
    USER_CONS_COLUMNS

    E
    USER_COLUMNS

    Note: Not available
    1. Report
  7. Question: What does the TRUNCATE statement do?

    A
    Removes the table

    B
    Removes all rows from a table

    C
    Shortens the table to 10 rows

    D
    Removes all columns from a table

    Note: Not available
    1. Report
  8. Question: Top N analysis requires _____ and _____.

    A
    The use of rowed & Only an inline view

    B
    a GROUP BY clause & Only an inline view

    C
    an ORDER BY clause & An inline view and an outer query

    D
    None of these

    Note: Not available
    1. Report
  9. Question: Which data dictionary view holds information about the column in a view?

    A
    USER_VIEWS

    B
    USER_VIEW_COLUMNS

    C
    USER_TAB_COLUMNS

    D
    USER_ALL_COLUMNS

    Note: Not available
    1. Report
  10. Question: Which of the following SELECT statements should be used to extract the year from the system date to display it in the format "2001"?

    A
    SELECT TO_CHAR(SYSDATE, 'yyyy') FROM dual;

    B
    SELECT TO_DATE(SYSDATE, 'yyyy') FROM dual;

    C
    SELECT DECODE(SUBSTR(SYSDATE, 8), 'YYYY') FROM dual;

    D
    SELECT DECODE(SUBSTR(SYSDATE, 8), 'year') FROM dual;

    E
    SELECT TO_CHAR(SUBSTR(SYSDATE, 8,2),'yyyy') FROM dual;

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd