Essay
(a)SQL*Plus environment variables are set to default values when SQL*Plus is started. State three ways by which users can change the default setting.
(b)Write SQL*Plus commands to do the following:
• List all SQL*Plus commands;
• Connect to the database 'OracleDB' with the user name 'CustomerOrders' and password 'customer';
• Use the COLUMN command to set the output format of the field 'StaffName' to 30 characters.
(c) Write SQL statements to do the following:
(1) List the name and granted roles of the current user;
(2) List name and type of all objects owned by the current user;
(3) List table name and the tablespace name to which the table is assigned of all tables owned by the current user;
(4) List the next value of the sequence Emp_Seq.
(d)Given the following schema of a database table:
Orders( , dateDue, totalValue, status, custNo)
where: custNo is the number of the customer who placed the order.
Write a script with the necessary formatting commands (e.g. COLUMN, BREAK, TTITLE, etc.) and an SQL statement to create a report that lists each customer number, each order number he/she placed, the total value of each order, the sum of the total values of all the orders for each customer, and the grand total of all the orders placed by all customers under the following heading:
Correct Answer:

Verified
(a) Users can change the default setting...View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Correct Answer:
Verified
View Answer
Unlock this answer now
Get Access to more Verified Answers free of charge
Q3: The following tables form part of a
Q4: Consider the following relational schema:<br> <img src="https://d2lvgg3v3hfg70.cloudfront.net/TBE0001/.jpg"
Q5: Assuming that a single-row form is
Q6: (a) In PL/SQL what is a Cursor?
Q7: The relational schema shown below is part
Q9: (a) What is a 'table' and what
Q10: Oracle database consists of logical and physical
Q11: A relational database contains details about journeys
Q12: Write SQL*Plus commands to do the following:
Q13: (a) What is a SQL*Plus script? Why