SUBJECTS
|
BROWSE
|
CAREER CENTER
|
POPULAR
|
JOIN
|
LOGIN
Business Skills
|
Soft Skills
|
Basic Literacy
|
Certifications
About
|
Help
|
Privacy
|
Terms
|
Email
Search
Test your basic knowledge |
Oracle SQL
Start Test
Study First
Subjects
:
oracle
,
it-skills
Instructions:
Answer 50 questions in 15 minutes.
If you are not ready to take this test, you can
study here
.
Match each statement with the correct term.
Don't refresh. All questions and answers are randomly picked and ordered every time you load a test.
This is a study tool. The 3 wrong answers for each question are randomly chosen from answers to other questions. So, you might find at times the answers obvious, but you will see it re-enforces your understanding as you take the test each time.
1. Write an SQL statement for SQL *Plus in which you want any unique menu items to be displayed from the restaurant table
IN ANY ALL SOME
UNION
SELECT DISTINCT menu FROM restaurant
4000
2. A join across three tables can be expressed with the ________ join syntax.
USER_ - ALL_ - DBA_ - and V$
ANSI
Time zone
Nested
3. Explain how you can optimize your queries with subqueries and the main advantage of doing so.
Combine
Crow's foot
MINUS
Subqueries allow you to nest multiple queries into each other. This gives you the ability to use one statement to break down a problem into individual components. Without nesting queries - you would be required to have multiple queries which could be
4. You can simplify the writing of SQL statements by writing SQL _________ that generate and execute other SQL statements.
Subqueries allow you to nest multiple queries into each other. This gives you the ability to use one statement to break down a problem into individual components. Without nesting queries - you would be required to have multiple queries which could be
Re-create
@ or START
Script
5. SELECT LIST of a subquery in an INSERT statement
SET clause of an UPDATE statement
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
Export Data
Re-create
6. Users can only see changes made to a database once they have been...
SUM
Committed
Equijoin and correlated subquery
Recursive
7. Dynamic views begin with a ___________.
BETWEEN
Groups
V$
Orphan
8. The ________________ is a type of statement whereby you retrieve data that exists in one table - but not in another.
ANSI
Static or dynamic
Orphan
MINUS
9. The _____________ clause determines how rows are grouped.
GROUP BY
Structured Query Language
Multiple rows
A correct statement
10. The RTRIM function is useful for eliminating ________ in a string.
Extra spaces
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
Multiple rows
SELECT DISTINCT menu FROM restaurant
11. Explain in detail the impact of INDEXES and how they are used by Oracle.
Orphan
Leading-edge
ON
To achieve good performance for data retrieval and data manipulation statements Oracle uses indexes. In the same way you would use an index in the back of a book to quickly find information - Oracle uses indexes to speed up data retrieval. If the app
12. Write the syntax to rename index just_two_more_weeks_i to finally_i
DROP INDEX need_to_pass_i
The main components of a ROWID are the data object number - the number of the data block - the numbers of rows within the data block - and the data file number.
Another null
RENAME just_two_more_weeks TO finally_i
13. The ______ operator compares a list of values for equivalency
The indexed column is part of an expression. In this case - consider creating a function-based index instead
Has not changed the name
GROUP BY
ANY
14. Which operator is most commonly used?
Equijoin and correlated subquery
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
UNION
RIGHT LEFT JOIN
15. To restart a sequence at a lower number - you can drop and ________ the sequence.
Any
12:00:00 A.M
FALSE
Re-create
16. The _______ operator determines common rows.
INTERSECT
Results
X
Common column value
17. Write a statement for SQL*Plus that shows the dictionary.
VALUES
Parent table
DESC dict;
Time zone
18. The ALTER SESSION statement can change the session's...
Null
Time zone
Implicit conversion
FALSE
19. The __________ operator is inclusive of the two values specified.
BETWEEN
Lists all objects accessible for the chosen database connection. Also lists a helpful dependencies report for accessing change impact.
Hide data
The way NULL values are treated
20. What does SQL stand for?
Structured Query Language
Equijoin and correlated subquery
Nested
Black
21. The NEXTVAL and CURRVAL pseudocolumns can be used in which of the following SQL constructs? Select all that apply.
RENAME just_two_more_weeks TO finally_i
Results
When the table is small (unless your business rules require you too)
VALUES clause of an INSERT statement
22. The key that most database designers prefer and is chosen by the system is the _____________ key.
Scalar
Surrogate
Constraints are used to enforce the business rules of a system. For instance - 'The salary of an employee may not be a negative number' may be enforced with a check constraint on the salary column. Constraints also ensure integrity and data consisten
SELECT SYSDATE+1/96 - FROM dual
23. List the different types of data dictionary views.
Equijoin and correlated subquery
USER_ - ALL_ - DBA_ - and V$
When you issue a INSERT - UPDATE - DELETE - or MERGE statement - Oracle automatically locks the modified rows. The lock prevents other sessions from making changes to these rows. The lock is released when the session initiating change commits or roll
All
24. You can use the ________________ to subtract months from a given date.
Implicit conversion
V$
Committed
ADD_MONTHS function
25. UNION ALL does not sort - therefore it is less time consuming to use than the...
SET clause of an UPDATE statement
X
UNION operator
CLOB
26. When column names on the tables are different - you use the ______ condition.
Month ddth - yyyy
ON
Non-matching rows
Hide data
27. When disabling a unique or primary key - you can keep the index if you specify the __________________ clause in the ALTER TABLE statement.
TO_CHAR function
Equijoin and correlated subquery
Both MIN and MAX
KEEP INDEX
28. What does the following function return? SELECT LENGTH(NULL) - FROM dual
Export Data
Null
Recursive
Constraints are used to enforce the business rules of a system. For instance - 'The salary of an employee may not be a negative number' may be enforced with a check constraint on the salary column. Constraints also ensure integrity and data consisten
29. The focus of the logical data model is _____________
Business problems
When you issue a INSERT - UPDATE - DELETE - or MERGE statement - Oracle automatically locks the modified rows. The lock prevents other sessions from making changes to these rows. The lock is released when the session initiating change commits or roll
Location of the file
Has not changed the name
30. When you create a report in SQL Developer all the column names must match identically the names of the columns found in the tables you are referencing.
Location of the file
4
FALSE
B-Tree Index
31. It is always good practice to include the old values in the WHERE clause of UPDATE to ensure that another session or user _________________ in the meantime.
Surrogate
Constraints are used to enforce the business rules of a system. For instance - 'The salary of an employee may not be a negative number' may be enforced with a check constraint on the salary column. Constraints also ensure integrity and data consisten
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Has not changed the name
32. The ____________ command makes changes permanent.
X
Mathematical equations
Logical unit of work
COMMIT
33. What do views do that makes them so useful for security?
Self-joins
Hide data
RUN SCRIPT
Re-create
34. How many characters can be stored in the CHAR column/field?
Results
IN ANY ALL SOME
STORAGE
2000
35. The Nonequijoin can use the ________________ operator to construct joins that are not based on equality of values.
Fractional seconds
Mathematical equations
ROLLBACK
BETWEEN
36. If a graphical representation of a table's box has __________ it means that the relationship is identifying.
F12
Rounded edges
MINUS
SET clause of an UPDATE statement
37. A transaction is a...
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Actual column
Logical unit of work
Data
38. All SQL statements contained within a script must end with a _______________ - even if they are done in SQL Developer.
INNER JOIN
Semicolon or forward slash
Columns
FALSE
39. List the steps performed by a correlated subquery.
**** Select a row from the outer query - Determine the value of the correlated column - Execute the inner query for each record of the outer query. - Feed the results of the inner query to the outer query and evaluate it. It if satisfies the criteria
ALL_OBJECTS
INTERSECT
The SPOOL command - together with a file name - spools any subsequently issued SQL Plus or SQL command to a file. Just as with other file names - you can add a path to store the file in a directory other than your SQL Plus default directory. SQL Deve
40. Checks whether any value in the list makes the condition true.
The static data dictionary stores details about database objects - such as tables - indexes - and views. Whenever a new object is added or an object is changed - data about the object is recorded in the data dictionary.
Any
ALL_OBJECTS
All
41. ____________ are useful for analyzing and exploring the relationships within your data
The main components of a ROWID are the data object number - the number of the data block - the numbers of rows within the data block - and the data file number.
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Self-joins
99.99
42. List 6 Table-Related Menu Choices
ADD
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
To achieve good performance for data retrieval and data manipulation statements Oracle uses indexes. In the same way you would use an index in the back of a book to quickly find information - Oracle uses indexes to speed up data retrieval. If the app
DICT_COLUMNS
43. The query retrieves more than 5 to 15 percent of the rows
Precision
Null
Has not changed the name
The indexed column is part of an expression. In this case - consider creating a function-based index instead
44. To revert back to a state that happened before you ran your change statement - you issue a ____________ command.
Results
ROLLBACK
Parent table
When the table is small (unless your business rules require you too)
45. What is the most common DATE format found in SQL?
DD-MON-YY
Load the file into the SQL Statement Box - by opening the location the file is stored and inserting it into the statement Box. Next you can press the F5 key.
V$
Rounded edges
46. Write a statement that drops the index need_to_pass_i
Primary key/foreign key
DROP INDEX need_to_pass_i
Orable's flashback query feature allows you to look at values of a query at a specific time in the past - such as before specfic DML statements occured. This can be usefull in case a suer accidentally performs an unintended but committed DML change.
GROUP BY
47. Explain the differences in how an ANSI Full Outer Join and a Full Outer Join using the UNION Operator work
The way NULL values are treated
X
**** Select a row from the outer query - Determine the value of the correlated column - Execute the inner query for each record of the outer query. - Feed the results of the inner query to the outer query and evaluate it. It if satisfies the criteria
DESC dict;
48. A _________ subquery returns a single column with a single row
999999.9999
4000
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
Scalar
49. When using the following data: NUMBER(10 -4) - the # 10 is called the __________.
Both MIN and MAX
The indexed column is part of an expression. In this case - consider creating a function-based index instead
Precision
B-Tree Index
50. A _____ is a query definition stored in the database that looks just like a table - but does not have any physical rows
Null
TO_CHAR function
X
The SPOOL command - together with a file name - spools any subsequently issued SQL Plus or SQL command to a file. Just as with other file names - you can add a path to store the file in a directory other than your SQL Plus default directory. SQL Deve