Oracle 1z0 061
Oracle 1z0 061
Oracle
Exam 1z0-061
Oracle Database 12c: SQL Fundamentals
Verson: Demo
[ Total Questions: 10 ]
Oracle 1z0-061 : Practice Exam
Question No : 1
You need to generate a list of all customer last names with their credit limits from the
customers table.
Those customers who do not have a credit limit should appear last in the list.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B,C
Explanation:
If the ORDER BY clause is not used, the sort order is undefined, and the Oracle server
may not fetch rows in the same order for the same query twice. Use the ORDER BY clause
to display the rows in a specific order.
Note: Use the keywords NULLS FIRST or NULLS LAST to specify whether returned rows
containing null values should appear first or last in the ordering sequence. ANSWER C
Sorting
The default sort order is ascending:
• Numeric values are displayed with the lowest values first (for example, 1 to 999).
• Date values are displayed with the earliest value first (for example, 01-JAN-92 before 01-
JAN-95).
• Character values are displayed in the alphabetical order (for example, “A” first and “Z”
last).
Leaders in it certification 2
Oracle 1z0-061 : Practice Exam
• Null values are displayed last for ascending sequences and first for descending
sequences.
- ANSWER B
• You can also sort by a column that is not in the SELECT list.
Question No : 2
View the Exhibit and examine the structure of the customers table.
Using the customers table, you need to generate a report that shows the average credit
limit for customers in Washington and NEW YORK.
Leaders in it certification 3
Oracle 1z0-061 : Practice Exam
A. Option A
B. Option B
C. Option C
D. Option D
Answer: C
Question No : 3
YOU need to display the date ll-oct-2007 in words as ‘Eleventh of October, Two Thousand
Seven'.
A. Option A
Leaders in it certification 4
Oracle 1z0-061 : Practice Exam
B. Option B
C. Option C
D. Option D
Answer: A
Question No : 4
View the Exhibit and examine the data in the products table.
You need to display product names from the products table that belong to the
'software/other' category with minimum prices as either S2000 or S4000 and no unit of
measure.
Answer: A
Leaders in it certification 5
Oracle 1z0-061 : Practice Exam
Question No : 5
1. Display the first name and tax amount of the customers. Tax is 5% of their credit limit.
2. Only those customers whose income level has a value should be considered.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: B
Leaders in it certification 6
Oracle 1z0-061 : Practice Exam
Question No : 6
You need to display the first names of all customers from the customers table that contain
the character 'e' and have the character 'a' in the second last position.
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A
Explanation:
The SUBSTR(string, start position, number of characters) function accepts three
parameters and returns a string consisting of the number of characters extracted from the
source string, beginning at the specified start position:
Leaders in it certification 7
Oracle 1z0-061 : Practice Exam
SUBSTR2 uses UCS2 code points. SUBSTR4 uses UCS4 code points.
When you do not specify a value for this argument, then the function
The INSTR(source string, search item, [start position], [nth occurrence of search item])
function returns a number that represents the position in the source string, beginning from
the given start position, where the nth occurrence of the search item begins:
instr('http://www.domain.com', '.', 1, 2) = 18
Question No : 7
Answer: B,D
Explanation:
ROUND: Rounds value to a specified decimal
TRUNC: Truncates value to a specified decimal
MOD: Returns remainder of division
SYSDATE is a date function that returns the current database server date and time.
Date-Manipulation Functions
Date functions operate on Oracle dates. All date functions return a value of the DATE data
type except MONTHS_BETWEEN, which returns a numeric value.
MONTHS_BETWEEN(date1, date2): Finds the number of months between date1 and
date2. The result can be positive or negative. If date1 is later than date2, the result is
positive; if date1 is earlier than date2, the result is negative. The noninteger part of the
result represents a portion of the month.
ADD_MONTHS(date, n): Adds n number of calendar months to date. The value of n must
be an integer and can be negative.
NEXT_DAY(date, 'char'): Finds the date of the next specified day of the week ('char')
following date. The value of char may be a number representing a day or a character
Leaders in it certification 8
Oracle 1z0-061 : Practice Exam
string.
LAST_DAY(date): Finds the date of the last day of the month that contains date
The above list is a subset of the available date functions. ROUND and TRUNC number
functions can also be used to manipulate the date values as shown below:
ROUND(date[, 'fmt']): Returns date rounded to the unit that is specified by the format model
fmt. If the format model fmt is omitted, date is rounded to the nearest day.
TRUNC(date[, 'fmt']): Returns date with the time portion of the day truncated to the unit that
is specified by the format model fmt. If the format model fmt is omitted, date is truncated to
the nearest day.
Question No : 8
Leaders in it certification 9
Oracle 1z0-061 : Practice Exam
Evaluate the following create table statement:
Which two statements are true about the creation of the SALES1 table?
Answer: A,D
Question No : 9
Answer: B,D,E
Question No : 10
Leaders in it certification 10
Oracle 1z0-061 : Practice Exam
The command to create a table fails. Identify the two reasons for the SQL statement
failure?
Answer: A,C
Explanation:
CHECK Constraint
The CHECK constraint defines a condition that each row must satisfy. The condition can
use the same constructs as the query conditions, with the following exceptions:
References to the CURRVAL, NEXTVAL, LEVEL, and ROWNUM pseudocolumns
Calls to SYSDATE, UID, USER, and USERENV functions
Queries that refer to other values in other rows
A single column can have multiple CHECK constraints that refer to the column in its
definition.
There is no limit to the number of CHECK constraints that you can define on a column.
CHECK constraints can be defined at the column level or table level.
CREATE TABLE employees
(...
Salary NUMBER(8, 2) CONSTRAINT emp_salary_min
CHECK (salary > 0),
Leaders in it certification 11