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 is it not a good idea to use an index?
When the table is small (unless your business rules require you too)
X
Nested
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.
2. You can pass parameters from the operating system when ___________ in SQl*Plus
GROUP BY
BETWEEN
Running a script file
X
3. Explain how Oracle treats locks when a database is being updated and needs to be viewed by other users.
BETWEEN
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
Mathematical equations
+
4. The _______ function lets you perform if-then-else functionality with the SQL language.
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
Semicolon or forward slash
Three
DECODE
5. The ROWID pseudocolumn is not an ________- but it acts like one.
Scalar
A correct statement
Actual column
Fractional seconds
6. The same function can be used ______ in a SELECT statement.
Business problems
Three
INTERSECT
Twice
7. What are the main components of a ROWID?
Null
Black
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
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.
8. The ____________ keywords and the USING clause of the ANSI join syntax are mutually exclusive.
B-Tree Index
Static or dynamic
NATURAL JOIN
Primary key/foreign key
9. NUMBER functions can be...
Common column value
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.
Nested
LIKE
10. What is the most common DATE format found in SQL?
B-Tree Index
X
Logical unit of work
DD-MON-YY
11. What do views do that makes them so useful for security?
SUM
Export Data
Month ddth - yyyy
Hide data
12. When writing an ANSI outer join - the keywords _________ OUTER and _________ OUTER are added to the __________ keyword to indicate the rows from which table to use.
User-defined reports
DICTIONARY
Both MIN and MAX
RIGHT LEFT JOIN
13. When you run a script in SQL*Plus you must give the...
Location of the file
Orphan
Month ddth - yyyy
VALUES clause of an INSERT statement
14. _________ and __________ functions are opposites of each other and provide a value in a group of rows.
All caps
SYSDATE
ANY
Both MIN and MAX
15. The NEXTVAL and CURRVAL pseudocolumns can be used in which of the following SQL constructs? Select all that apply.
VALUES clause of an INSERT statement
DICT_COLUMNS
Equijoin and identical column names
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
16. The key that most database designers prefer and is chosen by the system is the _____________ key.
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.
UNION
Surrogate
The indexed column is part of an expression. In this case - consider creating a function-based index instead
17. 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.
Has not changed the name
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
SET clause of an UPDATE statement
12:00:00 A.M
18. Returns rows if the condition is true for all the values in the list
Static or dynamic
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
All
SELECT SYSDATE+1/96 - FROM dual
19. When you want to run a script in either SQL*Plus or SQL Developer - you can use a ______ or the _________ command.
Crow's foot
@ or START
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
Time zone
20. The COUNT function is useful for determining whether a table has...
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
Data
Month ddth - yyyy
ALL_OBJECTS
21. When using the following data: NUMBER(10 -4) - the # 10 is called the __________.
B-Tree Index
BETWEEN
Precision
Common column value
22. A join across three tables can be expressed with the ________ join syntax.
ANSI
Committed
B-Tree Index
F12
23. A calculation with a null always yields...
Logical unit of work
KEEP INDEX
User-defined reports
Another null
24. PAGESIZE
Recursive
Multiple rows
999999.9999
Default is 14; when you use the default - you repeat the heading every 14 rows.
25. The ______ depicts the M of a 1:M relationship.
Warning
: Invalid argument supplied for foreach() in
/var/www/html/basicversity.com/show_quiz.php
on line
183
26. The ____________ command makes changes permanent.
DICT_COLUMNS
COMMIT
Script
MODIFY
27. What is Oracle's most popular index storage structure?
DESC dict;
B-Tree Index
When the table is small (unless your business rules require you too)
Null
28. The ______ operator compares a list of values for equivalency
ANY
ON
KEEP INDEX
V$
29. The TIMESTAMP WITH LOCAL TIME ZONE data type allows...
KEEP INDEX
Fractional seconds
Semicolon or forward slash
Any
30. The Nonequijoin can use the ________________ operator to construct joins that are not based on equality of values.
USER_ - ALL_ - DBA_ - and V$
DECODE
User-defined reports
BETWEEN
31. What is the maximum value for a column defined as NUMBER(4 -2)?
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
99.99
Extra spaces
DICT_COLUMNS
32. A _________ subquery returns a single column with a single row
Twice
Scalar
Columns
The way NULL values are treated
33. The ________ operator cannot compare against a list of values.
LIKE
**** 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
4000
Equijoin and correlated subquery
34. Comparison operators can compare multiple _________________.
Black
Recursive
Columns
The way NULL values are treated
35. What is the Oracle data dictionary called that contains a set of tables and views containing the data about the database?
ALL_OBJECTS
DICT_COLUMNS
VALUES
Scalar
36. A transaction is a...
2000
Logical unit of work
Running a script file
Columns
37. Which one of the following string functions tells you how many characters are in a string?
LENGTH
Recursive
Equijoin and correlated subquery
Actual column
38. _________________ relationships are always optional relationships.
Correlated
Recursive
Business problems
Structured Query Language
39. Instead of using the Oracle Outer Join Operator or the ANSI syntax - you can achieve the same result with two SQL statements: ____________ and a ____________
Static or dynamic
Optional
Equijoin and correlated subquery
ROLLBACK
40. When you have issued a DELETE command - you can still ________ those rows and restore the information.
Same
999999.9999
Retrieve
Asterisk
41. Explain how you can optimize your queries with subqueries and the main advantage of doing so.
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
@ or START
LIKE
MINUS
42. An outer join includes the result rows returned by an __________ plus extra rows where no matches are found.
Run scripts
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.
Equijoin
Surrogate
43. 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?
MINUS
Nested
Running a script file
DICTIONARY
44. Explain in detail the impact of INDEXES and how they are used by Oracle.
Primary key/foreign key
ADD_MONTHS function
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
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.
45. You can __________ DISTINCT and a GROUP BY clause in the same SELECT statement.
Testing functions
Combine
Surrogate
12:00:00 A.M
46. Explain how Dynamic SQL is used and give an example of a Dynamic SQL statement.
Any
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Non-matching rows
47. ___________ subqueries allow you to reference columns from the outer query and execute the inner query repeatedly
Correlated
Running a script file
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
Surrogate key
48. You can simplify the writing of SQL statements by writing SQL _________ that generate and execute other SQL statements.
ANSI
Script
SELECT SYSDATE+1/96 - FROM dual
DESC dict;
49. Explain the steps needed to run a script in SQL Developer
ANY
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.
FALSE
LIKE
50. Which operator is most commonly used?
KEEP INDEX
UNION
Fractional seconds
COMMIT