Question: 1
Examine the commands used to create DEPARTMENT_DETAILS and COURSE_DETAILS:
SQL>CREATE TABLE DEPARTMENT_DETAILS
(DEPARTMENT_ID NUMBER PRIMARY KEY,
DEPARTMENT_NAMEVARCHAR2(50),
HODVARCHAR2(50));
SQL>CREATE TABLE COURSE_DETAILS
(COURSE_IDNUMBER PRIMARY KEY,
COURSE_NAMEVARCHAR2(50),
DEPARTMENT_IDVARCHAR2(50));
You want to generate a list of all department IDs along with any course IDs that may have been assigned to them.
Which SQL statement must you use?
Question: 2
Which two tasks can be performed by using Oracle SQL statements?
Question: 3
View the exhibit for the structure of the STUDENT and FACULTY tables.
STUDENT
NameNull?Type
--------------------------------------------------
STUDENT_IDNOT NULLNUMBER(2)
STUDENT_NAMEVARCHAR2(20)
FACULTY_IDVARCHAR2(2)
LOCATION_IDNUMBER(2)
FACULTY
NameNull?Type
--------------------------------------------------
FACULTY_IDNOT NULLNUMBER(2)
FACULTY_NAMEVARCHAR2(20)
LOCATION_IDNUMBER(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: 4
View the exhibit and examine the structure of ORDERS and CUSTOMERS tables.
ORDERS
Name
Null?
Type
ORDER_ID
NOT NULL
NUMBER(4)
ORDER_DATE
NOT NULL
DATE
ORDER_MODE
VARCHAR2(8)
CUSTOMER_ID
NOT NULL
NUMBER(6)
ORDER_TOTAL
NUMBER(8, 2)
CUSTOMERS
Name
Null?
Type
CUSTOMER_ID
NOT NULL
NUMBER(6)
CUST_FIRST_NAME
NOT NULL
VARCHAR2(20)
CUST_LAST_NAME
NOT NULL
VARCHAR2(20)
CREDIT_LIMIT
NUMBER(9,2)
CUST_ADDRESS
VARCHAR2(40)
Which INSERT statement should be used to add a row into the ORDERS table for the customer whose CUST_LAST_NAME is Roberts and CREDIT_LIMIT is 600? Assume there exists only one row with CUST_LAST_NAME as Roberts and CREDIT_LIMIT as 600.
Answer : C
Show Answer
Hide Answer
Question: 5
Which statements are correct regarding indexes? (Choose all that apply.)