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. The TRUNC function on a date without a format model truncates the timestamp to...
DICT_COLUMNS
Static or dynamic
12:00:00 A.M
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
2. The ____________ icon allows you to execute multiple statements and emulates SQL *Plus as much as possible.
+
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
ADD
RUN SCRIPT
3. Write the syntax to rename index just_two_more_weeks_i to finally_i
Default is 14; when you use the default - you repeat the heading every 14 rows.
Both MIN and MAX
@ or START
RENAME just_two_more_weeks TO finally_i
4. You can simplify the writing of SQL statements by writing SQL _________ that generate and execute other SQL statements.
Equijoin and identical column names
Script
4000
LENGTH
5. What does the following function return? SELECT LENGTH(NULL) - FROM dual
Actual column
ADD
DROP INDEX need_to_pass_i
Null
6. Explain how Dynamic SQL is used and give an example of a Dynamic SQL statement.
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
F12
USER_ - ALL_ - DBA_ - and V$
Black
7. Which operator is most commonly used?
UNION
Details
DICTIONARY
UTC
8. What is the command you would type into SQL*Plus if you needed to know the definition for each column of a table?
Twice
DICT_COLUMNS
LIKE
DROP INDEX need_to_pass_i
9. ___________ subqueries allow you to reference columns from the outer query and execute the inner query repeatedly
Correlated
RIGHT LEFT JOIN
+
Combine
10. The RTRIM function is useful for eliminating ________ in a string.
Extra spaces
FALSE
Inconsistencies
ANSI
11. SQL Developer's ____________________ option allows you to selectively export certain rows and columns.
Recursive
BETWEEN
Export Data
ANSI
12. _________ rows are not allowed in the relational model.
Has not changed the name
2000
MODIFY
Orphan
13. ____________ are useful for analyzing and exploring the relationships within your data
12:00:00 A.M
INTERSECT
4
Self-joins
14. What is the maximum value for a column defined as NUMBER(4 -2)?
GROUP BY
99.99
DROP INDEX need_to_pass_i
Testing functions
15. Match each of the SQL commands on the left with a verb from the list.
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
+
ON
16. A calculation with a null always yields...
NATURAL JOIN
**** 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
Another null
Rounded edges
17. UNION ALL does not sort - therefore it is less time consuming to use than the...
Equijoin and identical column names
MINUS
UNION operator
Business problems
18. When you want to run a script in either SQL*Plus or SQL Developer - you can use a ______ or the _________ command.
Equijoin and identical column names
@ or START
Any
Groups
19. In a view you can give a column a different name than it has in the...
Black
Parent table
DECODE
Details
20. What are the main components of a ROWID?
Script
GROUP BY
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.
The indexed column is part of an expression. In this case - consider creating a function-based index instead
21. Write an SQL statement for SQL *Plus in which you want any unique menu items to be displayed from the restaurant table
SELECT DISTINCT menu FROM restaurant
Leading-edge
Inconsistencies
Business problems
22. What is the data type you can use if you need an unlimited number of textual characters?
CLOB
Twice
Any
SUM
23. When you run a script in SQL*Plus you must give the...
DESC dict;
Equijoin and identical column names
Location of the file
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.
24. If a graphical representation of a table's box has __________ it means that the relationship is identifying.
99.99
INNER JOIN
Rounded edges
Non-matching rows
25. When disabling a unique or primary key - you can keep the index if you specify the __________________ clause in the ALTER TABLE statement.
Hide data
Equijoin
KEEP INDEX
Both MIN and MAX
26. The _______ function lets you perform if-then-else functionality with the SQL language.
All
All caps
Running a script file
DECODE
27. The ROWID pseudocolumn is not an ________- but it acts like one.
Groups
Same
Actual column
ANY
28. LINESIZE
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Rounded edges
Columns
Semicolon or forward slash
29. To join four tables - you must have at least _____ join conditions.
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
Month ddth - yyyy
Three
Has not changed the name
30. Explain the steps needed to run a script in SQL Developer
Black
When you want to run the same script repeatedly - but want to be able to change a variable you would use a substitution variable. During the execution of the script the user will be prompted to input the variable to use.
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.
UNION operator
31. What do views do that makes them so useful for security?
Hide data
Equijoin
Any
UTC
32. Another name for a data dictionary view is __________________ or _________________.
Script
Hide data
SUM
Static or dynamic
33. _________________ relationships are always optional relationships.
Recursive
ANSI
Groups
BETWEEN
34. In SQL Developer field names and table names are shown in the color _______.
Both MIN and MAX
Black
Retrieve
When you want to run the same script repeatedly - but want to be able to change a variable you would use a substitution variable. During the execution of the script the user will be prompted to input the variable to use.
35. Which format mask displays December 31st - 1999?
Combine
Asterisk
Month ddth - yyyy
**** 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
36. List 4 aggregate functions
Has not changed the name
Script
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
SUM
37. Explain how Substitution Variables are used when writing scripts.
COMMIT
Hide data
When you want to run the same script repeatedly - but want to be able to change a variable you would use a substitution variable. During the execution of the script the user will be prompted to input the variable to use.
TO_CHAR function
38. Explain how you can optimize your queries with subqueries and the main advantage of doing so.
Same
STORAGE
User-defined reports
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
39. Write a statement for SQL*Plus that shows the dictionary.
Same
SUM
Semicolon or forward slash
DESC dict;
40. The Nonequijoin can use the ________________ operator to construct joins that are not based on equality of values.
BETWEEN
Black
@ or START
DD-MON-YY
41. SELECT LIST of a subquery in an INSERT statement
Columns
SET clause of an UPDATE statement
Extra spaces
STORAGE
42. The query retrieves more than 5 to 15 percent of the rows
The indexed column is part of an expression. In this case - consider creating a function-based index instead
FALSE
Both MIN and MAX
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.
43. Explain what a static data dictionary view is and how it is used
ANY
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.
Scale
Script
44. What is the syntax used to indicate that you are using the Oracle Outer Join operator?
+
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.
DECODE
All
45. The key that most database designers prefer and is chosen by the system is the _____________ key.
Any
Surrogate
Mathematical equations
SET clause of an UPDATE statement
46. The ALTER SESSION statement can change the session's...
Time zone
Same
V$
Logical unit of work
47. The focus of the logical data model is _____________
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.
Export Data
STORAGE
Business problems
48. Explicit data type conversion is preferable to Oracle's...
ROLLBACK
A correct statement
Implicit conversion
Lists all objects accessible for the chosen database connection. Also lists a helpful dependencies report for accessing change impact.
49. Subqueries can return...
Multiple rows
VALUES
ANSI
DICTIONARY
50. List the different types of data dictionary views.
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
USER_ - ALL_ - DBA_ - and V$
ROLLBACK
SELECT DISTINCT menu FROM restaurant