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. Explain how Substitution Variables are used when writing scripts.
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
VALUES
INTERSECT
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. List 4 aggregate functions
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
Nested
X
UNION
3. Which operator is most commonly used?
INTERSECT
UNION
Parent table
Primary key/foreign key
4. Match each of the SQL commands on the left with a verb from the list.
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
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
DECODE
Nested
5. When is it not a good idea to use an index?
RIGHT LEFT JOIN
When the table is small (unless your business rules require you too)
STORAGE
Black
6. Explain how you can optimize your queries with subqueries and the main advantage of doing so.
Orphan
Three
LIKE
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
7. Comparison operators can compare multiple _________________.
Rounded edges
2000
Columns
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
8. The ____________ icon allows you to execute multiple statements and emulates SQL *Plus as much as possible.
Actual column
Equijoin and correlated subquery
Precision
RUN SCRIPT
9. When column names on the tables are different - you use the ______ condition.
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
NATURAL JOIN
GROUP BY
ON
10. The purpose of the HAVING clause is to eliminate___________.
ALL_OBJECTS
Correlated
Groups
Parent table
11. Checks whether any value in the list makes the condition true.
A correct statement
Any
Scalar
Equijoin and identical column names
12. NUMBER functions can be...
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
Columns
MINUS
Nested
13. To restart a sequence at a lower number - you can drop and ________ the sequence.
Primary key/foreign key
The indexed column is part of an expression. In this case - consider creating a function-based index instead
Re-create
Month ddth - yyyy
14. When you want to run a script in either SQL*Plus or SQL Developer - you can use a ______ or the _________ command.
SELECT SYSDATE+1/96 - FROM dual
Correlated
@ or START
Recursive
15. The data type definitions NUMBER(10) and NUMBER(10 -0) are the...
INTERSECT
Default is 14; when you use the default - you repeat the heading every 14 rows.
IN ANY ALL SOME
Same
16. To equijoin a table with another table involves matching the...
Nested
Common column value
Precision
SYSDATE
17. You can simplify the writing of SQL statements by writing SQL _________ that generate and execute other SQL statements.
Both MIN and MAX
Script
Leading-edge
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
18. Returns rows if the condition is true for all the values in the list
All
DD-MON-YY
Precision
MODIFY
19. What is Oracle's most popular index storage structure?
Run scripts
B-Tree Index
Logical unit of work
Committed
20. Which format mask displays December 31st - 1999?
12:00:00 A.M
INTERSECT
Month ddth - yyyy
Hide data
21. To join four tables - you must have at least _____ join conditions.
4
X
Three
Testing functions
22. FEEDBACK
USER_ - ALL_ - DBA_ - and V$
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
Command returns the number of records returned by a query.
23. The term ____________ ___________ is used to express a join that satisfies the join condition.
STORAGE
INNER JOIN
RENAME just_two_more_weeks TO finally_i
ANY
24. When you run a script in SQL*Plus you must give the...
INNER JOIN
Location of the file
Parent table
FALSE
25. 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?
Script
DICTIONARY
Leading-edge
FALSE
26. The using clause of the ANSI join syntax always assumes an...
Equijoin and identical column names
4
FALSE
Non-matching rows
27. Information that is returned after you run your statement are found in the __________ tab in SQL Developer.
LENGTH
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
ANY
Results
28. When writing the syntax for finding information on three or more tables - the parenthesis around the ON clause is...
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.
Optional
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
Export Data
29. Subqueries can return...
LIKE
CLOB
ANY
Multiple rows
30. A calculation with a null always yields...
SELECT DISTINCT menu FROM restaurant
Another null
LENGTH
Same
31. LINESIZE
Non-matching rows
Fractional seconds
Command determines the total number of characters SQL *Plus displays in on line before beginning a new line.
Black
32. List 6 Table-Related Menu Choices
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
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.
Rounded edges
33. The TRUNC function on a date without a format model truncates the timestamp to...
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
Combine
X
12:00:00 A.M
34. Another name for a data dictionary view is __________________ or _________________.
FALSE
Static or dynamic
UNION
Orphan
35. What is the main difference between the NOT EXISTS and the NOT IN operators?
User-defined reports
The way NULL values are treated
Leading-edge
LENGTH
36. The COUNT function is useful for determining whether a table has...
ADD_MONTHS function
ANSI
Data
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
37. Queries that are found in parentheses are done first - just as in the order of operations when doing...
4000
Mathematical equations
Parent table
Rounded edges
38. What is the most common DATE format found in SQL?
Run scripts
DD-MON-YY
Retrieve
Black
39. SQL Developer's ____________________ option allows you to selectively export certain rows and columns.
Running a script file
B-Tree Index
Export Data
Results
40. A transaction is a...
Same
4
Logical unit of work
SUM
41. 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.
LENGTH
RENAME just_two_more_weeks TO finally_i
Logical unit of work
42. The __________ operator is inclusive of the two values specified.
BETWEEN
Three
999999.9999
RENAME just_two_more_weeks TO finally_i
43. Which one of the following string functions tells you how many characters are in a string?
IN ANY ALL SOME
LENGTH
Black
COMMIT
44. All SQL statements contained within a script must end with a _______________ - even if they are done in SQL Developer.
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
Extra spaces
Semicolon or forward slash
999999.9999
45. To place a line comment in your SQL statements - you first place a // at the beginning of the line.
Columns
FALSE
Business problems
Crow's foot
46. The ____________ clause on a CREATE TABLE statement can specify how much space to allocate.
Both MIN and MAX
KEEP INDEX
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
STORAGE
47. Oracle uses the outer join operator to indicate that nulls are shown for...
Location of the file
COUNT(registration_date) - AVG (capacity) - MIN (capacity) - MAX (capacity)
Non-matching rows
RENAME - COPY - DROP - TRUNCATE - LOCK - & COMMENT
48. When returning multiple rows - a subquery must contain the _____ - _____ - _____ - or ______ operator - otherwise Oracle will return an error
Control - Revoke - Define - TRUNCATE Manipulate - MERGE
VALUES
IN ANY ALL SOME
Any
49. Joins involving multiple columns must always follow the ____________ relationship path.
Primary key/foreign key
RUN SCRIPT
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
LENGTH
50. SELECT LIST of a subquery in an INSERT statement
**** 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
SET clause of an UPDATE statement
Scale
ADD