Question 256

Which two queries execute successfully?
  • Question 257

    Which two statements are true regarding the EXISTS operator used in the correlated subqueries? (Choose two.)
  • Question 258

    View the exhibit for the structure of the STUDENTand FACULTYtables.
    STUDENT
    Name Null? Type
    ------------------ ------------------- -------------
    STUDENT_ID NOT NULL NUMBER(2)
    STUDENT_NAME VARCHAR2(20)
    FACULTY_ID VARCHAR2(2)
    LOCATION_ID NUMBER(2)
    FACULTY
    Name Null? Type
    - ----------------- ------------------- -------------
    FACULTY_ID NOT NULL NUMBER(2)
    FACULTY_NAME VARCHAR2(20)
    LOCATION_ID NUMBER(2)
    You need to display the faculty name followed by the number of students handled by the faculty at the base location.
    Examine the following two SQL statements:
    Statement 1
    SQL>SELECT faculty_name, COUNT(student_id)
    FROM student JOIN faculty
    USING (faculty_id, location_id)
    GROUP BY faculty_name;
    Statement 2
    SQL>SELECT faculty_name, COUNT(student_id)
    FROM student NATURAL JOIN faculty
    GROUP BY faculty_name;
    Which statement is true regarding the outcome?
  • Question 259

    Examine the structure of the EMPLOYEEStable:

    There is a parent/child relationship between EMPLOYEE_IDand MANAGER_ID.
    You want to display the name, joining date, and manager for all employees. Newly hired employees are yet to be assigned a department or a manager. For them, 'No Manager' should be displayed in the MANAGERcolumn.
    Which SQL query gets the required output?
    SELECT e.last_name, e.hire_date, NVL(m.last_name, 'No Manager') Manager
  • Question 260

    A session's NLS_DATE_FORMAT is set to DD Mon YYYY .
    Which two queries return the value 1 Jan 2019?