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. When you want to run a script in either SQL*Plus or SQL Developer - you can use a ______ or the _________ command.
ADD
Groups
@ or START
A correct statement
2. When you have issued a DELETE command - you can still ________ those rows and restore the information.
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.
Correlated
Optional
Retrieve
3. Explain the steps needed to run a script in SQL Developer
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
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.
COMMIT
Same
4. To revert back to a state that happened before you ran your change statement - you issue a ____________ command.
Re-create
ROLLBACK
LIKE
SUM
5. The query retrieves more than 5 to 15 percent of the rows
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
DICT_COLUMNS
The indexed column is part of an expression. In this case - consider creating a function-based index instead
Default is 14; when you use the default - you repeat the heading every 14 rows.
6. _________ and __________ functions are opposites of each other and provide a value in a group of rows.
**** 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
B-Tree Index
Both MIN and MAX
UNION
7. The TIMESTAMP WITH LOCAL TIME ZONE data type allows...
Recursive
Fractional seconds
BETWEEN
B-Tree Index
8. Explain how Dynamic SQL is used and give an example of a Dynamic SQL statement.
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
ALL_OBJECTS
Fractional seconds
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
9. List 4 aggregate functions
All caps
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.
Groups
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
10. When is it not a good idea to use an index?
Results
Groups
When the table is small (unless your business rules require you too)
Running a script file
11. What does the following function return? SELECT LENGTH(NULL) - FROM dual
DROP INDEX need_to_pass_i
Null
The indexed column is part of an expression. In this case - consider creating a function-based index instead
STORAGE
12. Explain why constraints are used when building tables.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
13. A transaction is a...
Logical unit of work
Any
Run scripts
Details
14. If a graphical representation of a table's box has __________ it means that the relationship is identifying.
99.99
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
Rounded edges
Results
15. Checks whether any value in the list makes the condition true.
Any
V$
DICTIONARY
VALUES clause of an INSERT statement
16. What do views do that makes them so useful for security?
Leading-edge
Hide data
Command returns the number of records returned by a query.
ANSI
17. Explain how Substitution Variables are used when writing scripts.
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.
**** 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
Inconsistencies
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
18. You can use the ________________ to subtract months from a given date.
ADD_MONTHS function
When the table is small (unless your business rules require you too)
Crow's foot
Common column value
19. What is the main difference between the NOT EXISTS and the NOT IN operators?
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
Precision
Structured Query Language
The way NULL values are treated
20. What is the name of the key automatically generated from a sequence?
Precision
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
Surrogate key
Null
21. An outer join includes the result rows returned by an __________ plus extra rows where no matches are found.
Details
DROP INDEX need_to_pass_i
Scalar
Equijoin
22. What is the most common DATE format found in SQL?
Any
The way NULL values are treated
DD-MON-YY
COMMIT
23. The ALTER SESSION statement can change the session's...
DESC dict;
+
Time zone
SYSDATE
24. What is the name of the view where you can find the collection of static and data dictionary tables and views - along with their descriptions?
Asterisk
**** 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
Default is 14; when you use the default - you repeat the heading every 14 rows.
DICTIONARY
25. Self-joins are useful for performing comparisons and checking for ___________ in data.
Inconsistencies
Testing functions
Crow's foot
4
26. What are the main components of a ROWID?
Twice
Parent table
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.
Rounded edges
27. When column names on the tables are different - you use the ______ condition.
Both MIN and MAX
MINUS
RENAME just_two_more_weeks TO finally_i
ON
28. Explain how Oracle treats locks when a database is being updated and needs to be viewed by other users.
Orphan
DESC dict;
NATURAL JOIN
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
29. When returning multiple rows - a subquery must contain the _____ - _____ - _____ - or ______ operator - otherwise Oracle will return an error
Results
Common column value
Optional
IN ANY ALL SOME
30. When writing the syntax for finding information on three or more tables - the parenthesis around the ON clause is...
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
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
Surrogate key
Optional
31. The ROWID pseudocolumn is not an ________- but it acts like one.
DECODE
DICT_COLUMNS
Retrieve
Actual column
32. The TRUNC function on a date without a format model truncates the timestamp to...
X
12:00:00 A.M
Location of the file
Nested
33. 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
Semicolon or forward slash
Surrogate
Time zone
34. Which one of the following string functions tells you how many characters are in a string?
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
Inconsistencies
Script
LENGTH
35. LINESIZE
Inconsistencies
Has not changed the name
GROUP BY
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
36. Which operator is most commonly used?
BETWEEN
Business problems
UNION
A correct statement
37. It is considered good form to put all SQL commands in...
Re-create
All caps
All
STORAGE
38. _________________ relationships are always optional relationships.
DESC dict;
KEEP INDEX
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
Recursive
39. The ______ operator compares a list of values for equivalency
INTERSECT
ANY
12:00:00 A.M
UNION
40. Which format mask displays December 31st - 1999?
Equijoin and correlated subquery
Details
Run scripts
Month ddth - yyyy
41. Explain how the SPOOL command is used and what program it can be used in.
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
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
Self-joins
42. __________________ inserts the current date and time.
Results
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.
SYSDATE
ANSI
43. List the different types of data dictionary views.
SYSDATE
USER_ - ALL_ - DBA_ - and V$
Scalar
Hide data
44. Returns rows if the condition is true for all the values in the list
Scalar
Another null
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
All
45. The _______ function adds values together for a group of rows.
SUM
ANSI
F12
Retrieve
46. To place a line comment in your SQL statements - you first place a // at the beginning of the line.
ADD_MONTHS function
Recursive
Script
FALSE
47. Write a statement for SQL*Plus that shows the dictionary.
DESC dict;
RIGHT LEFT JOIN
Asterisk
Equijoin and correlated subquery
48. When using the following data: NUMBER(10 -4) - the # 4 is called the __________.
Non-matching rows
Scale
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
LENGTH
49. The Nonequijoin can use the ________________ operator to construct joins that are not based on equality of values.
SELECT SYSDATE+1/96 - FROM dual
BETWEEN
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.
Results
50. What is the keyboard shortcut for the ROLLBACK command?
Nested
UNION operator
F12
Combine