Oracle 1z0-051 Exam Practice Questions (P. 1)
- Full Access (290 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #1
Evaluate the SQL statement:
TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)
TRUNCATE TABLE DEPT;
Which three are true about the SQL statement? (Choose three.)
- AIt releases the storage space used by the table.
- BIt does not release the storage space used by the table.
- CYou can roll back the deletion of rows after the statement executes.
- DYou can NOT roll back the deletion of rows after the statement executes.
- EAn attempt to use DESCRIBE on the DEPT table after the TRUNCATE statement executes will display an error.
- FYou must be the owner of the table or have DELETE ANY TABLE system privileges to truncate the DEPT table
Correct Answer:
ADF
A: The TRUNCATE TABLE Statement releases storage space used by the table,
D: Can not rollback the deletion of rows after the statement executes,
F: You must be the owner of the table or have DELETE ANY TABLE system privilege to truncate the DEPT table.
Incorrect answer:
Cis not true -
Dis not true -
Eis not true -
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-18
ADF
A: The TRUNCATE TABLE Statement releases storage space used by the table,
D: Can not rollback the deletion of rows after the statement executes,
F: You must be the owner of the table or have DELETE ANY TABLE system privilege to truncate the DEPT table.
Incorrect answer:
Cis not true -
Dis not true -
Eis not true -
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 8-18
send
light_mode
delete
Question #2
You need to design a student registration database that contains several tables storing academic information.
The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.
You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table.
Which statement creates the foreign key?
The STUDENTS table stores information about a student. The STUDENT_GRADES table stores information about the student's grades. Both of the tables have a column named STUDENT_ID. The STUDENT_ID column in the STUDENTS table is a primary key.
You need to create a foreign key on the STUDENT_ID column of the STUDENT_GRADES table that points to the STUDENT_ID column of the STUDENTS table.
Which statement creates the foreign key?
- ACREATE TABLE student_grades (student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk REFERENCES (student_id) FOREIGN KEY students(student_id));
- BCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id));
- CCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT FOREIGN KEY (student_id) REFERENCES students(student_id));
- DCREATE TABLE student_grades(student_id NUMBER(12),semester_end DATE, gpa NUMBER(4,3), CONSTRAINT student_id_fk FOREIGN KEY (student_id) REFERENCES students(student_id));
Correct Answer:
D
CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name (column_name);
Incorrect answer:
Ainvalid syntax -
Binvalid syntax -
Cinvalid syntax -

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-14
D
CONSTRAINT name FOREIGN KEY (column_name) REFERENCES table_name (column_name);
Incorrect answer:
Ainvalid syntax -
Binvalid syntax -
Cinvalid syntax -

Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 10-14
send
light_mode
delete
Question #3
Here is the structure and data of the CUST_TRANS table:
Exhibit:
CUST_TRANS -
Name Null? Type
-------------- ----------------- ------------------
CUSTNO NOT NULL CHAR (2)
TRANSDATE DATE
TRANSAMT NUMBER (6, 2)
CUSTNO TRANSDATE TRANSAMT
------------- ----------------------- -----------------------
11 01-JAN-07 1000
22 01-FEB-07 2000
33 01-MAR-07 3000
Dates are stored in the default date format dd-mm-rr in the CUST_TRANS table.
Which three SQL statements would execute successfully? (Choose three.)
Exhibit:
CUST_TRANS -
Name Null? Type
-------------- ----------------- ------------------
CUSTNO NOT NULL CHAR (2)
TRANSDATE DATE
TRANSAMT NUMBER (6, 2)
CUSTNO TRANSDATE TRANSAMT
------------- ----------------------- -----------------------
11 01-JAN-07 1000
22 01-FEB-07 2000
33 01-MAR-07 3000
Dates are stored in the default date format dd-mm-rr in the CUST_TRANS table.
Which three SQL statements would execute successfully? (Choose three.)
- ASELECT transdate + '10' FROM cust_trans;
- BSELECT * FROM cust_trans WHERE transdate = '01-01-07';
- CSELECT transamt FROM cust_trans WHERE custno > '11';
- DSELECT * FROM cust_trans WHERE transdate='01-JANUARY-07';
- ESELECT custno + 'A' FROM cust_trans WHERE transamt > 2000;
Correct Answer:
ACD
ACD
send
light_mode
delete
Question #4
See the Exhibit and examine the structure and data in the INVOICE table:
Exhibit:

Which two SQL statements would executes successfully? (Choose two.)
Exhibit:

Which two SQL statements would executes successfully? (Choose two.)
- ASELECT MAX(inv_date),MIN(cust_id) FROM invoice;
- BSELECT MAX(AVG(SYSDATE - inv_date)) FROM invoice;
- CSELECT (AVG(inv_date) FROM invoice;
- DSELECT AVG(inv_date - SYSDATE),AVG(inv_amt) FROM invoice;
Correct Answer:
AD
AD
send
light_mode
delete
Question #5
Which three statements are true regarding sub queries? (Choose three.)
- AMultiple columns or expressions can be compared between the main query and sub query
- BMain query and sub query can get data from different tables
- CSub queries can contain GROUP BY and ORDER BY clauses
- DMain query and sub query must get data from the same tables
- ESub queries can contain ORDER BY but not the GROUP BY clause
- FOnly one column or expression can be compared between the main query and subqeury
Correct Answer:
ABC
ABC
send
light_mode
delete
All Pages