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. To place a line comment in your SQL statements - you first place a // at the beginning of the line.
BETWEEN
FALSE
LENGTH
12:00:00 A.M
2. List 6 Table-Related Menu Choices
BETWEEN
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
Details
3. What are the main components of a ROWID?
Fractional seconds
4
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.
COMMIT
4. 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.
Business problems
Columns
Has not changed the name
ADD_MONTHS function
5. Comparison operators can compare multiple _________________.
Equijoin
Scale
Columns
The indexed column is part of an expression. In this case - consider creating a function-based index instead
6. PAGESIZE
SUM
Default is 14; when you use the default - you repeat the heading every 14 rows.
2000
IN ANY ALL SOME
7. The term ____________ ___________ is used to express a join that satisfies the join condition.
X
Leading-edge
INNER JOIN
Implicit conversion
8. Instead of using the Oracle Outer Join Operator or the ANSI syntax - you can achieve the same result with two SQL statements: ____________ and a ____________
ON
Optional
Equijoin and correlated subquery
SUM
9. When you INSERT new information into a table - it is followed with a _______ keyword that contains the information that is going to be added to the table.
DESC dict;
DECODE
Data
VALUES
10. Write an SQL statement for SQL *Plus in which you want any unique menu items to be displayed from the restaurant table
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
INNER JOIN
SELECT DISTINCT menu FROM restaurant
Equijoin
11. Explain how Dynamic SQL is used and give an example of a Dynamic SQL statement.
ALL_OBJECTS
Static or dynamic
Precision
Dynamic SQL is used to be continuously updated by the background processes in the Oracle instance but never by the user.
12. 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
Script
Asterisk
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.
13. What is the data type you can use if you need an unlimited number of textual characters?
ANY
LIKE
Has not changed the name
CLOB
14. The ______ operator compares a list of values for equivalency
Combine
ANY
STORAGE
12:00:00 A.M
15. Information that is returned after you run your statement are found in the __________ tab in SQL Developer.
X
Results
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
Groups
16. The using clause of the ANSI join syntax always assumes an...
Equijoin and identical column names
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
Details
Retrieve
17. 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.
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.
RIGHT LEFT JOIN
VALUES clause of an INSERT statement
COMMIT
18. LINESIZE
CLOB
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Parent table
Black
19. SQL Developer's ____________________ option allows you to selectively export certain rows and columns.
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.
NATURAL JOIN
Export Data
ON
20. What is the syntax used to indicate that you are using the Oracle Outer Join operator?
Combine
+
Equijoin and identical column names
Asterisk
21. 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
KEEP INDEX
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.
MODIFY
22. To revert back to a state that happened before you ran your change statement - you issue a ____________ command.
GROUP BY
Retrieve
ROLLBACK
4
23. You can pass parameters from the operating system when ___________ in SQl*Plus
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
12:00:00 A.M
Time zone
Running a script file
24. Write the syntax to rename index just_two_more_weeks_i to finally_i
Columns
Static or dynamic
RENAME just_two_more_weeks TO finally_i
Surrogate
25. Explain how the SPOOL command is used and what program it can be used in.
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
DESC dict;
Has not changed the name
RIGHT LEFT JOIN
26. The data type definitions NUMBER(10) and NUMBER(10 -0) are the...
Same
Common column value
When the table is small (unless your business rules require you too)
Run scripts
27. Explain the steps needed to run a script in SQL Developer
RIGHT LEFT 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
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
28. What is the command you would type into SQL*Plus if you needed to know the definition for each column of a table?
B-Tree Index
+
RENAME just_two_more_weeks TO finally_i
DICT_COLUMNS
29. A transaction is a...
Surrogate key
Logical unit of work
BETWEEN
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
30. Queries that are found in parentheses are done first - just as in the order of operations when doing...
Mathematical equations
2000
Three
SUM
31. The ________ operator cannot compare against a list of values.
Implicit conversion
Self-joins
LIKE
+
32. Checks whether any value in the list makes the condition true.
Default is 14; when you use the default - you repeat the heading every 14 rows.
Equijoin and correlated subquery
Any
Leading-edge
33. 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
Surrogate
VALUES clause of an INSERT statement
DICTIONARY
34. ____________ are useful for analyzing and exploring the relationships within your data
Semicolon or forward slash
Equijoin and correlated subquery
Self-joins
Common column value
35. SQL Developer provides an extensive list of useful reports and offers the capability to create your own...
USER_ - ALL_ - DBA_ - and V$
User-defined reports
Committed
Script
36. SELECT * FROM instructor ORDER BY phone
4000
A correct statement
DD-MON-YY
Scale
37. Explain how you can optimize your queries with subqueries and the main advantage of doing so.
Three
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
Semicolon or forward slash
When the table is small (unless your business rules require you too)
38. Match each of the SQL commands on the left with a verb from the list.
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
2000
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
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.
39. The _______ function adds values together for a group of rows.
Three
Business problems
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
SUM
40. What is the main difference between the NOT EXISTS and the NOT IN operators?
KEEP INDEX
The way NULL values are treated
RIGHT LEFT JOIN
ANY
41. What does the following function return? SELECT LENGTH(NULL) - FROM dual
Null
Hide data
Another null
When the table is small (unless your business rules require you too)
42. List 4 aggregate functions
Another null
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
Common column value
@ or START
43. Converting a text literal to DATE format requires the use of the...
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.
TO_CHAR function
Equijoin and identical column names
KEEP INDEX
44. Users can only see changes made to a database once they have been...
VALUES clause of an INSERT statement
Committed
Scalar
Columns
45. The ROWID pseudocolumn is not an ________- but it acts like one.
Any
ANY
MINUS
Actual column
46. List the steps performed by a correlated subquery.
Nested
ON
User-defined reports
**** 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
47. What is the tab in SQL Developer where data dictionary view information can be found?
Recursive
UNION operator
Details
INTERSECT
48. The ____________ keywords and the USING clause of the ANSI join syntax are mutually exclusive.
Default is 14; when you use the default - you repeat the heading every 14 rows.
NATURAL JOIN
Asterisk
IN ANY ALL SOME
49. When using the following data: NUMBER(10 -4) - the lowest number you can possibly have is __________.
Surrogate key
999999.9999
Common column value
X
50. List the different types of data dictionary views.
USER_ - ALL_ - DBA_ - and V$
KEEP INDEX
X
CLOB