Oracle Database and SQL Fundamentals
Test your knowledge of Oracle database concepts, SQL statements, stored procedures, triggers, and PL/SQL programming.
Questions
What is true of using group functions on columns that contain NULL Values
- Group functions on columns ignore NULL values.
- Group functions on columns returning dates include NULL values
- Group functions on columns returning numbers include NULL values.
- Group functions on columns cannot be accurately used on columns that contain NULL values.
You cannot modify data in a view if it contains: Group functions such as SUM, MIN, MAX, AVG, … A GROUP BY clause. The DISTINCT keyword. Columns defined by expressions (i.e, SAL * 12). The ROWNUM pseudo column.
- True
- False
Which table should you query to determine when your procedure was last compiled?
- USER_OBJECTS
- USER_PROCEDURES
- USER_PROCS
- USER_PLSQL_UNITS
A transaction is a set of SQL statements between any two COMMIT and ROLLBACK statements
- True
- False
Which of the following syntax is correct for creating a proc
- CREATE OR REPLACE PROCEDURE <<Procedure name>> as
- CREATE OR REPLACE PROCEDURE <<Procedure name>>(Parameter list) as
- CREATE OR REPLACE PROCEDURE <<Procedure name>> is
- All of the above
Choose correct statement below
- When a parameter is passed as an IN variable it is passed by reference
- When variables are passed in OUT or INOUT mode it is pass by value
- The NOCOPY clause tells to PL/SQL engine to pass the variable by reference
- All of the above
How can you migrate from a LONG to a LOB data type for a column?
- Use the DBMS_MANAGE_LOB.MIGRATE procedure
- Use the UTL_MANAGE_LOB.MIGRATE procedure.
- Use the ALTER TABLE command
- You cannot migrate from a LONG to a LOB date type for a column
You need to create a trigger on the EMP table that monitors every row that is changed and places this information into the AUDIT_TABLE. What type of trigger do you create?
- FOR EACH ROW trigger on the EMP table.
- Statement-level trigger on the EMP table.
- FOR EACH ROW trigger on the AUDIT_TABLE table.
- Statement-level trigger on the AUDIT_TABLE table.
NOARCHIVELOG mode does have the advantage of not having to write transactions to an archive log and thus increases the performance of the database slightly.
- True
- False
The ANALYZE command is used to gather statistics on a table
- True
- False
Before making a tablespace read only, which of the following conditions must be met
- The tablespace must be online
- The tablespace must not contain any active rollback segments
- he tablespace must not be involved in an open backup
- All of the above
Select correct type of parameter mode used in oracle
- IN
- OUT
- IN OUT
- All of the above
You need to remove the database trigger T1. Which command do you use to remove the trigger in the SQL *Plus environment?
- DROP TRIGGER T1
- DELETE TRIGGER T1
- ALTER TRIGGER T1 DISABLE
- None of the above
A cold backup is taking a backup of the database while it is shut down and does not require being in archive log mode.
- True
- False
What tablespace is automatically created when we create a database
- The Default tablespace
- The temp tablespace
- The SYSTEM tablespace
- None of the above
In which four clauses can a subquery be used?
- in the INTO clause of an INSERT statement
- in the GROUP BY clause of a SELECT statement
- in the VALUES clause of an INSERT statement
- in the ORDER BY clause of a SELECT statement
Uses of SSIS
- to move data from one data source to another
- powerful ETL tool
- To design various kind of reports
- to provide business information to a wider audience within an organization
What does the following SQL statement do: SELECT Customer, COUNT(Order) FROM Sales GROUP BY Customer HAVING COUNT(Order) >5
- Selects the total number of orders from the Sales table, if this number is greater than 5
- Selects all customers from table Sales that have made more than 5 orders.
- Selects all Customers from the Sales table
- None of the above
Which of the following SQL statements is correct?
- TRUNCATE Sales TABLE
- TRUNCATE * FROM TABLE Sales
- TRUNCATE TABLE Sales
- All the above
What is a stored procedure?
- A process for data export/import.
- A set of SQL statements stored and executed as a single entity.
- A process to convert tables.
- Data stored in a database.