Sie sind auf Seite 1von 37

Exam : NR0-013

Title : Teradata SQL v2r5


Ver

: 03-03-08

NR0-013

QUESTION 1:
Which three of the following statements are true in relation to view definitions?
(Choose three.)
A. You can create an index on a view.
B. You can use derived tables within a view.
C. You can use an ORDER BY within a view.
D. You can perform aggregations within a view.
E. You can assign new column names within a view.
Answer: B,D,E
QUESTION 2:
A parameterized macro named Certkiller is executed by which statement?
A. EXEC Certkiller (10, ' Certkiller ');
B. EXEC Certkiller (:10, :' Certkiller ');
C. EXEC Certkiller VALUES(10, ' Certkiller ');
D. EXEC MACRO Certkiller (10, ' Certkiller ');
Answer: A
QUESTION 3:
Views have which three of the following attributes? (Choose three.)
A. Views can contain a WHERE clause.
B. Views cannot be used to UPDATE a table.
C. Views must change if columns are added to a table.
D. Views are not affected if columns are added to a table.
E. Views provide an additional level of security or authorization.
Answer: A,D,E
QUESTION 4:
Which three security reasons justify the use of a macro? (Choose three.)
A. It limits the need to grant privileges on tables and views used in the macro.
B. The privilege to create the macro can be restricted to specified developers.
C. A parameterized macro can be designed to use the parameter to control the table or
view to access in the macro.
D. A parameterized macro can be designed to use the parameter to restrict access to a
Actualtests.com - The Power of Knowing

NR0-013
subset of the data for a given table or view used in the macro.
Answer: A,B,D
QUESTION 5:
Certkiller .com's employee table contains emp_no, emp_name, and dept_no.
Certkiller .com's department table contains dept_no and dept_name . Which query is
responsible for returning the employees who work in the Finance Department?
A.SELECT emp_name FROM employee WHERE dept_name LIKE'%Finance%';
B. SELECT emp_name FROM employee WHERE dept_no IN (SELECT e.dept_no
FROM employee WHERE dept_name LIKE '%Finance%');
C. SELECT emp_name FROM department WHERE dept_name LIKE '%Finance%' and
dept_no IN (SELECT e.dept_no FROM employee e);
D. SELECT emp_name FROM employee WHERE dept_no IN (SELECT d.dept_no
FROM department d WHERE dept_name LIKE'%Fnance%');
Answer: D
QUESTION 6:
Which two of the following statements concerning correlated subqueries are
accurate? (Choose two.)
A. They require temporary table space.
B. They require special access rights to create.
C. They always join a table to a subset of the same table.
D. They allow the user to process data from the same table twice within the query.
E. They are one method for locating a maximum or minimum occurrence within groups.
Answer: D,E
QUESTION 7:
Certkiller .com's employee table contains only empno and name columns.
Certkiller .com's department table contains only deptno and mgrno columns. Which
query is responsible for producing the names of all employees who are department
managers?
A. SELECT name FROM employee WHERE mgrno IN (SELECT mgrno FROM
department);
B. SELECT name FROM employee WHERE empno IN (SELECT mgrno FROM
department);
C. SELECT name FROM employee WHERE name IN (SELECT mgrno FROM
department);
Actualtests.com - The Power of Knowing

NR0-013
D. SELECT name FROM employee WHERE empno NOT IN (SELECT mgrno FROM
department);
Answer: B
QUESTION 8:
When you attempt to evade Data Dictionary access and transaction locks, which are
two table types you should consider? (Choose two.)
A. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: A,B
QUESTION 9:
Which two of the following statements are true with reference to Teradata derived
tables? (Choose two.)
A. If users can create a derived table, they can also share it with other users.
B. More than one derived table can be referenced in the same SQL statement.
C. Derived tables can be referenced by multiple SQL statements in a multi-statement
request.
D. Derived tables can be used to compare an aggregated value from a table to the
individual values from the rows of that table.
Answer: B,D
QUESTION 10:
What are two accessible table types when users want to generate a small temporary
table and have only spool space assigned to them? (Choose two.)
A. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: A,B
QUESTION 11:
After considering the following set of SQL statements, which statement would you
Actualtests.com - The Power of Knowing

NR0-013
judge to be true?
CREATE SET TABLE t1 (a INTEGER, b INTEGER) PRIMARY INDEX (a)
INSERT INTO t1 VALUES (1,1)
INSERT INTO t1 VALUES (1,2)
UPDATE t1 SET b = b + 1 WHERE b = 1
A. The INSERTs and the UPDATE succeed.
B. The second INSERT fails because it would create a duplicate primary index value.
C. The INSERTs succeeds but the UPDATE fails because the syntax is incorrect.
D. The INSERTs succeeds but the UPDATE fails because it would create a duplicate
row.
Answer: D
QUESTION 12:
MERGE INTO department USING VALUES (105, 'Sales Dept', 770000, 1018) AS
Dept (deptnum, deptname, budget, manager) ON Dept.deptnum =
department.department_number WHEN MATCHED THEN UPDATE SET
budget_amount = Dept.budget WHEN NOT MATCHED THEN INSERT VALUES
(Dept.deptnum,Dept.deptname,Dept budget,Dept.manager);
Which of the following are four true statements in relation to the following MERGE
INTO statement? (Choose four.)
A. The USING clause defines the source table row.
B. The primary index of the target table must be unique.
C. The AS clause specifies the name of the source table.
D. The operation performed is an Upsert on the department table.
E. The ON clause must contain the primary index of the target table.
Answer: A,C,D,E
QUESTION 13:
UPDATE has which are two features? (Choose two .)
A. It can include a self join.
B. It cannot include a subquery.
C. It must include a WHERE clause.
D. It can be performed on a single table view.
Answer: A,D
QUESTION 14:
Taking the following SQL statement into consideration, how many distinct
Actualtests.com - The Power of Knowing

NR0-013
SAMPLEID values are created if there are 10 rows from every state in the stores
table?
SELECT city, state, SAMPLEID FROM stores SAMPLE WITH REPLACEMENT
WHEN state = 'WI' THEN 4 ELSE 3 END ORDER BY 3
A. 2
B. 3
C. 4
D. 7
Answer: A
QUESTION 15:
Consider the following SQL statement:
SELECT cust_name, cust_addr, SAMPLEID FROM customer_table SAMPLE
WHEN state = 'CA' THEN .25, .20 ELSE .25, .35
Assuming that there are 10 rows from every state in customer_table, how many
distinct SAMPLEID values would you find in the answer set?
A. 1
B. 2
C. 4
D. None are found. The query results in an error because the sample percentages add to
greater than 1.
Answer: C
QUESTION 16:
DISTINCT applies to which column(s) in the following query?
SELECT DISTINCT dept_num, job_code FROM employee
A. job_code
B. dept_num
C. dept_num and job_code
D. It does not apply to either column as the query needs parentheses.
Answer: C
QUESTION 17:
What can you obtain as a result of the following SQL statement?
SELECT employee_number, department_number, salary_amount FROM
Personnel WITH SUM(salary_amount) ORDER BY department_number;

Actualtests.com - The Power of Knowing

NR0-013
A. total salaries for each department
B. no details, just a total of all salaries
C. a list of employee salaries with totals by department
D. a list of employee salaries with a grand total of all salaries
Answer: D
QUESTION 18:
Which three of the following statements are FALSE? (Choose three.)
A. An outer join requires an ON clause.
B. A cross join requires a WHERE clause.
C. An ON clause cannot be specified for a cross join.
D. A WHERE clause cannot be specified with a cross join.
E. An implicit join is a sequence of table references enclosed in parentheses.
F. For an implicit join, the join condition, if any, is specified in the WHERE clause.
Answer: B,D,E
QUESTION 19:
Which of the following are two appropriate methods of employing table aliasing to
avoid Cartesian product joins? (Choose two.)
A. SEL * FROM table_a A1, table_a WHERE A1.acct1 = table_a.acct2
B. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2
C. SEL * FROM table_a A1, table_a A2 WHERE A1.acct1 = table_a.acct2
D. SEL A1.c1, table_a.c2 FROM table_a A1, table_a A2 WHERE A1.acct1 = A2.acct2
Answer: A,B
QUESTION 20:
Exhibit:

Actualtests.com - The Power of Knowing

NR0-013

What result set will be produced by the query shown in the exhibit?
A. 5, NULL
B. 2, NULL
C. 2, 2300
D. 3, NULL
E. 2, 20000
Answer: B
QUESTION 21:
In which of the following clauses can the join condition be specified for an inner
join? (Choose two.)
A. the ON clause
B. the ANY clause
C. the FROM clause
D. the WHERE clause
Answer: A,D
QUESTION 22:
What kind of results is the FULL OUTER JOIN command designed to produce?
A. all unmatched data from both tables, with the matched data eliminated
B. all matched data from both tables, combined with all unmatched data from both tables
C. all rows from the table listed before the JOIN command and the unmatched rows from
the other table
D. all matched data from both tables, and the unmatched rows from the second table
listed in the JOIN clause

Actualtests.com - The Power of Knowing

NR0-013

Answer: B
QUESTION 23:
Exhibit:

What result set will be generated by the query shown in the exhibit?
A. Smith
B. Miller
C. NULL
D. Fisher
E. Adams
Answer: D

QUESTION 24:
Which of the following is the result obtained from the SELECT SESSION statement
?
A. the SQLFLAG value for the user
B. the session number for the user
C. the session transaction mode for the user
D. the number of sessions running for the user
Answer: B
QUESTION 25:
Which information about the specified table is provided by HELP TABLE
<tablename>?
A. column name, data type, and comment
B. column name, index, data type, and comment
C. column name, table id, data type, and comment
Actualtests.com - The Power of Knowing

NR0-013
D. column name, constraint, data type, and comment
Answer: A
QUESTION 26:
Which request in ANSI mode, is equivalent to the DELETE t1 request in Teradata
mode
A.DROP TABLE t1;
B.DELETE FROM t1;
C.DELETE FROM t1 ALL;
D.DELETE FROM t1;COMMIT;
Answer: D
QUESTION 27:
In query analysis, what information is provided by the EXPLAIN output to assist
the user? (Choose two.)
A. which steps may be processed in parallel
B. what statistics should be collected on a column
C. accurate time measurements for query processing
D. details of which indexes, if any, will be used to process the query
E. recommendations to improve the query based on timing and sizing
Answer: A,D
QUESTION 28:
Certkiller .com has an EMPLOYEE table with columns name, dept, salary. A report
of the employees with the lowest salary in their department is generated by which
statement?
A. SELECT name, dept, salary FROM EMPLOYEE ,(SELECT dept as min_dept,
MIN(salary) as min_sal FROM EMPLOYEE GROUP BY 1) a WHERE dept =
a.min_dept AND salary =a.min_sal;
B. SELECT name, dept, salary FROM EMPLOYEE GROUP BY dept HAVING salary =
MIN(salary);
C. SELECT name, dept, salary FROM EMPLOYEE e HAVING (SEL MIN(salary)
FROM EMPLOYEE f WHERE f.dept=e.dept GROUP BY dept)=salary;
D. SELECT name, dept, salary FROM EMPLOYEE e WHERE salary = (SELECT
MIN(salary)FROM EMPLOYEE f GROUP BY dept)AND e.dept=f.dept;
Answer: A

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 29:
You are an administrator for Certkiller .com. Certkiller .com requests the processing of
a SELECT statement that includes GROUP BY, WHERE, and HAVING clauses. In
what order are these clauses evaluated during execution?
A. WHERE, HAVING, GROUP BY
B. WHERE, GROUP BY, HAVING
C. HAVING, GROUP BY, WHERE
D. GROUP BY, HAVING, WHERE
E. GROUP BY, WHERE, HAVING
F. HAVING, WHERE, GROUP BY
Answer: B
QUESTION 30:
What is the result of the following query?
SELECT AVG (column1)FROM t1;Where t1 is an empty table
A. 0
B. Null
C. Error
D. No record found
Answer: B
QUESTION 31:
Which statement is true if you consider the following SQL statement?
SELECT colA, colB, SUM(colX) FROM table1 WHERE colA & gt;45 GROUP BY
colA HAVING SUM(colX)=20;
A. The query succeeds.
B. The query fails because of the WHERE clause.
C. The query fails because of the HAVING clause.
D. The query fails because of the GROUP BY clause.
Answer: D
QUESTION 32:
Which of the following is the MINUS operator equivalent to?
A. LESS
Actualtests.com - The Power of Knowing

NR0-013
B. NOT IN
C. EXCEPT
D. SUBTRACT
E. INTERSECT
Answer: C
QUESTION 33:
Table_1, which is the first table, has only one column and contains these values (100,
200, 300, 400, and 500). Table_2 also has only one column, but contains these values
(100, 200, 250, 275, and 500). What would the result set contain, if you utilize the
EXCEPT operator between these two tables?
A. 250, 275
B. 300, 400
C. 100, 200, 500
D. 250, 275, 300, 400
E. 100, 200, 250, 275, 300, 400, 500
F. 100, 100, 200, 200, 250, 275, 300, 400, 500, 500
Answer: B
QUESTION 34:
The position where a substring begins within a string is determined by which
Teradata SQL function?
A. POS
B. INDEX
C. CHARPOS
D. SUBINDEX
E. SUBSTRING
Answer: B
QUESTION 35:
The following output will be produced by which formatting string applied to a
timestamp?
Monday, November 04,2002 03:24:22 +00:00
A. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBZ '
B. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBT '
C. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBZ '
D. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBT '
Actualtests.com - The Power of Knowing

NR0-013

Answer: C
QUESTION 36:
Which of the following is the statement that generated the resultant answer set?
TITLE(employee_number) ---------------------- employee#
A.SELECT TITLE(employee#)FROM Employee;
B.SELECT DISTINCT TITLE(employee_number)FROM Employee;
C.SELECT DISTINCT TILTLE(employee#)FROM Employee;
D.SELECT DISTINCT (TITLE(employee#))FROM Employee;
Answer: B
QUESTION 37:
SELECT*FROM tmp_tb1 WHERE c1=9135 0R c1=9235 AND c2 & 1t;
51.00 ORDER BY 1;
Which answer set will the above SELECT statement return if the Table tmp_tbl
contains following four rows?
c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 9235 50.
A. c1 c2 ----------- ------- 9135 50. 9135 60. 9235 50.
B. c1 c2 ----------- ------- 9135 50. 9235 50. 9235 60.
C. c1 c2 ----------- ------- 9135 50. 9235 50.
D. c1 c2 ----------- ------- 9135 60. 9135 50.
E. c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60.
F. c1 c2 ----------- ------- 9135 60. 9135 50. 9235 60. 9235 50. ----------- ------- 9135 60.
9135 50. 9235 60. 9235 50. 9135 60. 9135 50. 9235 60. 9235 50. 9135 50. 9235 60. 9235
50. 9235 60. 9235 50.
Answer: A

QUESTION 38:
Which of the following is a true statement relating to a null during an ascending
sort?
A. It sorts after negative values and after blank character values.
B. It sorts after negative values and before blank character values.
C. It sorts before negative values and after blank character values.
D. It sorts before negative values and before blank character values.

Actualtests.com - The Power of Knowing

NR0-013

Answer: D
QUESTION 39:
DRAG DROP
As part of an exercise at Certkiller .com you are asked to explain evaluation
precedence by arranging the steps into the correct order.

Answer:

QUESTION 40:
In the string expression of the LIKE operator, which two of the following symbols
act as wildcards?
A. _ and $
B. $ and %
Actualtests.com - The Power of Knowing

NR0-013
C. & and %
D. _ and %
Answer: D
QUESTION 41:
" x BETWEEN y AND z" is equivalent to which logical comparison?
A.((x & gt;y)AND (x &lt;Z))
B.((x & gt;y)AND (x &lt;=Z))
C.((x & gt;=y)AND (x &lt;Z))
D.((x & gt;=y)AND (x &lt;Z))
Answer: D
QUESTION 42:
To differentiate null data from n on- null data, which two expressions would you
use? (Choose two.)
A. = NULL
B. IS NULL
C.&lt;& gt;NULL
D. NULL ONLY
E. IS NOT NULL
Answer: B,E
QUESTION 43:
What does the syntax element UNBOUNDED PRECEDING signify within ordered
analytic functions?
A. the one row prior to the current row
B. the entire partition before the current row
C. the number of rows before the current row
D. the entire partition before and after the current row
Answer: B
QUESTION 44:
Within a window, the group(s) over which an ordered analytical function executes is
determined by what SQL command?

Actualtests.com - The Power of Knowing

NR0-013
A. ROWS
B. ORDER BY
C. GROUP BY
D. PARTITION BY
Answer: D
QUESTION 45:
Which of the following are two true statements? (Choose two.)
A. Conversion of numeric to integer truncates any decimal portion.
B. Conversion of numeric to integer rounds up any decimal portion.
C. CAST can be used to convert a byte data type to another data type.
D. CAST can be used to convert a non-byte data type to another non-byte data type.
Answer: A,D
QUESTION 46:
Consider the following:
2.1**2 gives 4.41
What result does SELECT SQRT(-4.41) produce?
A. -2.1
B. -2
C. 2
D. 2.1
E. Error: Bad argument for SQRT function
Answer: E
QUESTION 47:
What is displayed as a result of the following query?
SELECT ADD_MONTHS(CURRENT_DATE,40*3);
A. the current date plus 10 years
B. the current date plus 120 days
C. the current date plus 120 years
D. the current date plus 40 months, three days
Answer: A
QUESTION 48:

Actualtests.com - The Power of Knowing

NR0-013
Which of the following is the result returned by SELECT CAST('bb12345' AS
CHAR(3)) in Teradata mode? (NOTE: b = blank)
A. 1
B. 'bb1'
C. 123
D. 345
E. '123'
F. '345'
Answer: B
QUESTION 49:
A table that is initialized with the result of a query is created by which statement?
A.CREATE TABLE t19 AS (SELECT al,C2 FROM t1,t2 WHERE q1=r2);
B. CREATE TABLE t19 LIKE (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
DATA;
C. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
DATA;
D. CREATE TABLE 19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
RESULTS;
Answer: C
QUESTION 50:
Which two of the following options can you specify in the CREATE TABLE
statement? (Choose two.)
A. join index
B. data block size
C. before and after journaling
D. maximum permanent space
Answer: B,C
QUESTION 51:
The CHECK constraint has which two attributes? (Choose two.)
A. It will not work on the primary index column.
B. Any Boolean comparison operator can be used.
C. Multiple columns can be checked at the table level.
D. A column on another table can be checked at the table level.

Actualtests.com - The Power of Knowing

NR0-013

Answer: B,C
QUESTION 52:
Which of the following are two features of the FLOAT data type? (Choose two.)
A. The internal length is 4 bytes.
B. The internal length is 8 bytes.
C. It is synonymous with REAL and DOUBLE PRECISION .
D. Has a minimum value of -32,768 and maximum value of 32,767.
Answer: B,C
QUESTION 53:
Of the following statements, which three are true in relation to dates? (Choose
three.)
A. DATE values are stored internally as integers.
B. DATE is a data type as well as a built-in function.
C. CURRENT_DATE is a data type as well as a built-in function.
D. CURRENT_DATE is a column in SYS_CALENDAR.CALENDAR .
E. The built-in functions DATE and CURRENT_DATE are equivalent.
Answer: A,B,E
QUESTION 54:
What type of data is a result of the following calculation?
SELECT DATE '2003-02-15' - DATE '2003-01-15';
A. DATE
B. INTEGER
C. INTERVAL DAY
D. INTERVAL MONTH
Answer: B
QUESTION 55:
Which of the following is an accurate statement regarding data types?
A. An INTERVAL times a number results in a number.
B. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP .
C. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL .
Actualtests.com - The Power of Knowing

NR0-013
D. A TIMESTAMP minus an INTERVAL results in an INTERVAL .
Answer: C
QUESTION 56:
What result is generated by the following query calculation?
SELECT EXTRACT (MINUTE FROM (TIMESTAMP '2002-12-15 09:45:20' +
INTERVAL '05 02:10'DAY TO MINUTE));
A. 11
B. 22
C. 30
D. 47
E. 55
Answer: E
QUESTION 57:
Which of the following is the given expression an equivalent of?
CASE WHEN x IS NOT NULL THEN x WHEN y IS NOT NULL THEN y ELSE
NULL END
A. NULLIF (x, y)
B. COALESCE (x, y)
C. ZEROIFNULL (x, y)
D. COMPRESS NULL (x, y)
Answer: B
QUESTION 58:
Of the following statements, which one has correct syntax?
A.SELECT CASE WHEN 'Boston'THEN 'Y'ELSE 'N' END FROM table_city;
B. SELECT city, CASE WHEN city = 'Boston' THEN 'Y' ELSE 'N' END FROM
table_city;
C. SELECT CASE WHEN city = 'Boston' THEN city = 'Y' ELSE 'N' END FROM
D. SELECT CASE WHEN table_city.city IN (SELECT u.city FROM u) THEN 'Y'
ELSE 'N' END FROM table_city;
Answer: B
QUESTION 59:
Which is a syntactically correct example of a Searched CASE expression?
Actualtests.com - The Power of Knowing

NR0-013
A.SELECT CASE IF x=1 THEN 'Yes'ELSE NULL END FROM Table_A;
B.SELECT CASE x WHEN 1 THEN 'Yes'ELSE 'No'END FROM Table_A;
C.SELECT CASE WHEN x=1 THEN 'yES'ELSE 'No'END FROM Table_A;
D.SELECT CASE SEARCH xFOR 1 IF=THEN 'Yes' ELSE 'No' FROM Table_A;
Answer: C
QUESTION 60:
What result would you expect of the following SQL statement?
SELECT SUM(CASE part_no WHEN '1' THEN ship_amt ELSE 0 END) /
SUM(ship_amt)FROM Table_T;
A. the total shipping cost attributed to all parts delivered
B. the fraction of the shipping cost attributed to part number 1
C. an error since you cannot place a CASE statement within a SUM statement
D. the total shipping cost attributed to part number 1 and the total shipping cost of all
parts
Answer: B
QUESTION 61:
Exhibit:

Given the exhibit, how many rows will the result set have?
A. 2
B. 3
C. 4
D. 5
E. 6
Answer: C

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 62:
A is table alias required in which of the following circumstances?
A. to enhance join processing
B. when joining a table to itself
C. when processing subqueries
D. when joining more than two tables
Answer: B
QUESTION 63:
What type of join is represented by the following query?
SELECT workers.name, workers.yrsexp, workers.deptno, managers.name,
managers.yrsexp FROM employee workers, employee managers WHERE
managers.deptno=workers.deptno;
A. self join
B. cross join
C. nested join
D. Cartesian join
Answer: A
QUESTION 64:
What two statements, which include an implicit join, have valid syntax? (Choose
two.)
A.SELECT*FROM t1 INNER JOIN t2 ON t1.a1=t2.a2,t3 WHERE t1,b1=t3.b3;
B.A.SELECT*FROM t1 JOIN t2 t3 ON t1.t1=t2.a2,WHERE t1,b1=t3.b3;
C.A.SELECT*FROM t1 t3 ON t1.a1=t2.a2AND t2.b2=t3.b3;
D.A.SELECT*FROM t1 t2 t3 WHERE t1.a1=t2.a2 AND t1.a1=t3.b3;
E.A.SELECT*FROM t1 INNER JOIN (t2,t3)ON t1.a1=t2.a2 AND t2=b2=t3.b3;
Answer: A,D
QUESTION 65:
Which statement is true in relation to the following query?
SELECT d.dept_no, d.name, e.name FROM department d INNER JOIN employee
e ON e.dept_no=d.dept_no;
A. It returns information about employees who have no department number.
B. It returns information about departments that have no employees assigned to them.
C. The ON clause can be replaced with a WHERE clause to produce the same results.
Actualtests.com - The Power of Knowing

NR0-013
D. It returns an output row for each successful match between employee and department.
Answer: D
QUESTION 66:
Consider the following:
SELECT e.name FROM department d RIGHT OUTER JOIN employee e ON
d.dept_no=e.dept_no LEFT OUTER JOIN job j ON e.job_code=j.job_code;
Which three of the following options could be included in the subsequent result set?
(Choose three.)
A. all employees
B. jobs without employees
C. departments with no employees
D. employees without departments
E. employees with invalid departments
Answer: A,D,E
QUESTION 67:
Macros is used for what two reasons? (Choose two.)
A. to have a query automatically ask for input values
B. to have the ability to pass parameter(s) to a query
C. to have a simple way to execute a fixed series of SQL statements
D. to have a simple way to create multiple tables in the same macro consistently
Answer: B,C
QUESTION 68:
Which of the following are three security reasons why macro is used? (Choose
three.)
A. It limits the need to grant privileges on tables and views used in the macro.
B. The privilege to create the macro can be restricted to specified developers.
C. A parameterized macro can be designed to use the parameter to control the table or
view to access in the macro.
D. A parameterized macro can be designed to use the parameter to restrict access to a
subset of the data for a given table or view used in the macro.
Answer: A,B,D

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 69:
Of the following options, which three are permitted within a view definition?
(Choose three.)
A. UPDATE
B. HAVING
C. ORDER BY
D. GROUP BY
E. LEFT OUTER JOIN
Answer: B,D,E
QUESTION 70:
Which of the following is the proper syntax for creating a parameterized macro that
includes the use of that parameter within the macro?
A. CREATE MACRO Certkiller (INTEGER x) AS (SELECT Emp_Name FROM Table_1
WHERE Emp_No=:x;);
B. CREATE MACRO Certkiller (:x INTEGER) AS (SELECT Emp_Name FROM
Table_1 WHERE Emp_No=X;);
C. CREATE MACRO Certkiller (x INTEGER) AS (SELECT Emp_Name FROM Table_1
WHERE Emp_No=:X;);
D. CREATE MACRO Certkiller (INTEGER x:) AS (SELECT Emp_Name FROM
Table_1 WHERE Emp_No=X;);
Answer: C
QUESTION 71:
The default order of precedence of the logical operators AND, NOT, and OR is
_________.
A. NOT, OR, AND
B. AND, OR, NOT
C. NOT, AND, OR
D. AND, NOT, OR
Answer: C
QUESTION 72:
If a single column table contains 100 rows with 37 of them being null, What is
returned by COUNT(*)?

Actualtests.com - The Power of Knowing

NR0-013
A. 63
B. 100
C. null
D. 63 with a warning message
Answer: B
QUESTION 73:
Which two of the following symbols function as wildcards in the string expression of
the LIKE operator?
A. _ and $
B. $ and %
C. & and %
D. _ and %
Answer: D
QUESTION 74:
Which of the following is a WHERE statement that never returns any rows?
A. WHERE (DEPTNO=2080 OR DEPTNO = 2200 OR (SALARY &lt; 90000 AND SALARY &gt; 40000
B. WHERE (DEPTNO=2080 OR DEPTNO = 2200 AND (SALARY &lt; 90000 OR SALARY &gt; 40000
C. WHERE (DEPTNO=2080 OR DEPTNO = 2200 AND (SALARY &lt; 90000 AND SALARY &gt; 40000
D. WHERE (DEPTNO=2080 AND DEPTNO = 2200 AND (SALARY &lt; 90000 AND SALARY &gt; 40000
Answer: D
QUESTION 75:
Of the following terms, which are two that is utilized to distinguish null data from n
on- null data? (Choose two.)
A. = NULL
B. IS NULL
C. &LT; &gt; NULL
D. NULL ONLY
E. IS NOT NULL
Answer: B,E
QUESTION 76:
Consider the following data for column name where the column is non-case specific:
Actualtests.com - The Power of Knowing

NR0-013
Alison, Dawn, Susan, Geoff, Bob, Gorm, and Paul.
What result set is generated for the following query in Teradata mode?
SELECT name FROM table_names WHERE name BETWEEN 'a' AND 'go'
A. Dawn, Bob, Geoff, Gorm
B. Alison, Bob, Dawn, Geoff
C. Dawn, Bob, Geoff, Gorm, Paul
D. Alison, Bob, Dawn, Geoff, Gorm
Answer: B
QUESTION 77:
Which statement about data types is correct?
A. An INTERVAL times a number results in a number.
B. A TIMESTAMP minus a TIMESTAMP results in a TIMESTAMP .
C. A TIMESTAMP minus a TIMESTAMP results in an INTERVAL .
D. A TIMESTAMP minus an INTERVAL results in an INTERVAL .
Answer: C
QUESTION 78:
What answer will the following query calculation produce?
SELECT EXTRACT (MINUTE FROM (TIMESTAMP '2002-12-15 09:45:20' +
INTERVAL '05:02;10' DAYI TO MINUTE));
A. 11
B. 22
C. 30
D. 47
E. 55
Answer: E

QUESTION 79:
Which three of the following statements regarding dates are accurate? (Choose
three.)
A. DATE values are stored internally as integers.
B. DATE is a data type as well as a built-in function.
C. CURRENT_DATE is a data type as well as a built-in function.
Actualtests.com - The Power of Knowing

NR0-013
D. CURRENT_DATE is a column in SYS_CALENDAR.CALENDAR .
E. The built-in functions DATE and CURRENT_DATE are equivalent.
Answer: A,B,E
QUESTION 80:
The following calculation results in which data type?
SELECT DATE '2003-02-15';-DATE '2003-01-15';
A. DATE
B. INTEGER
C. INTERVAL DAY
D. INTERVAL MONTH
Answer: B
QUESTION 81:
In which two SQL clauses can SAMPLEID terms appear with the SAMPLE
command? (Choose two.)
A. WHERE
B. SELECT
C. GROUP BY
D. ORDER BY
Answer: B,D
QUESTION 82:
Considering the following SQL statement:
SELECT state, SAMPLEID FROM stores SAMPLE WITH REPLACEMENT
WHEN state = 'CA' THEN 2, 4 WHEN state = 'MI' THEN 5, 7 ELSE 50 ORDER
BY 2;
Assuming that 10 rows from each state are included in the stores table, what is the
number of distinct SAMPLEID values that will appear in the result set?
A. 2
B. 4
C. 5
D. 68
Answer: C

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 83:
What describes the following SQL statement best?
SELECT name, salary, avgsal FROM (SELECT AVG(salary) FROM employee)
emp_temp(avgsal), employee WHERE salary &gt; avgsal ORDER BY salary DESC;
A. It is not valid.
B. It uses a derived table with aggregate.
C. It uses a nested subquery with aggregate.
D. It uses a correlated subquery with aggregate.
Answer: B
QUESTION 84:
Which of the following are three accurate statements pertaining to subqueries?
(Choose three.)
A. They can be nested.
B. They can use ORDER BY .
C. They generate a distinct list of values.
D. They can be the object of an IN or NOT IN .
Answer: A,C,D
QUESTION 85:
What result is produced by the following query?
SELECT last_name FROM employe ee WHERE ee.salary amount &gt; (SELECT
AVG (em.salary_amount) FROM employee em WHERE em.department_number =
ee.department_number);
A. all employees whose salaries are greater than the average salary
B. all employees whose salaries are greater than their departments' average salaries
C. all employees whose salaries are greater than the average of the average department
salary
D. one employee per department whose salary is greater than the department's average
salary
Answer: B
QUESTION 86:
"TITLE(employee_number) ---------------------- employee#", is a result set returned
by which of the following statements?
A.SELECT TITLE(employee#)FROM Employee;
B.SELECT DISTINCT TITLE(employee_number)FROM Employee;
Actualtests.com - The Power of Knowing

NR0-013
C.SELECT DISTINCT TILTLE(employee#)FROM Employee;
D.SELECT DISTINCT (TITLE(employee#))FROM Employee;
Answer: B
QUESTION 87:
What result does the following query generate?
SELECT INDEX (SUBSTRING ('DONNA KRAUS' FROM 5 FOR 5), 'RAU');
A. 1
B. 2
C. 3
D. 4
Answer: C
QUESTION 88:
"Monday, November 04,2002 03:24:22 PM", is the output generated by which
formatting string applied to a timestamp
A. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBZ '
B. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBZ '
C. FORMAT ' E3,BM2BD2,Y4BHH:MI:SSBT '
D. FORMAT ' E4,BM4BD2,Y4BHH:MI:SSBT '
Answer: D
QUESTION 89:
Which of the following rows will be returned to the user via this UNION operation?
SELECT col_1 FROM table_a UNION SELECT col_6 FROM table_b;
A. all rows in table_a that have matching rows in table_b
B. all rows from table_a and table_b, including duplicate rows
C. all rows from table_a and table_b, with duplicate rows eliminated
D. all rows from table_a and table_b, with output formatted by table_b
Answer: C
QUESTION 90:
The equivalent of an outer join can be performed using which set operator?

Actualtests.com - The Power of Knowing

NR0-013
A. MINUS
B. UNION
C. EXCEPT
D. INTERSECT
Answer: B
QUESTION 91:
Which SQL command specifies the window or subset of data, while using ordered
analytic functions?
A. IN ()
B. OVER ()
C. WINDOW ()
D. GROUP BY ()
Answer: B
QUESTION 92:
The syntax element UNBOUNDED PRECEDING signifies which of the following,
within ordered analytic functions?
A. the one row prior to the current row
B. the entire partition before the current row
C. the number of rows before the current row
D. the entire partition before and after the current row
Answer: B
QUESTION 93:
Which two of the following options are features of the CHECK constraint? (Choose
two.)
A. It will not work on the primary index column.
B. Any Boolean comparison operator can be used.
C. Multiple columns can be checked at the table level.
D. A column on another table can be checked at the table level.
Answer: B,C
QUESTION 94:
COMPRESS has which two characteristics? (Choose two.)
Actualtests.com - The Power of Knowing

NR0-013

A. It will compress repeating 1s and 0s.


B. It supports multiple values per column.
C. It can be used on character data types only.
D. It can be defined so a specific value is not stored in each row.
Answer: B,D
QUESTION 95:
What statement creates a table, which originates with the outcome of a query?
A. CREATE TABLE tl9 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2);
B. CREATE TABLE t19 LIKE (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
DATA;
C. CREATE TABLE t19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
DATA;
D. CREATE TABLE 19 AS (SELECT a1, c2 FROM t1, t2 WHERE q1=r2) WITH
RESULTS;
Answer: C
QUESTION 96:
Within the CREATE TABLE statement, what are two options that can be specified?
(Choose two.)
A. join index
B. data block size
C. before and after journaling
D. maximum permanent space
Answer: B,C
QUESTION 97:
Which of the following is a condition that is true all the time?
A. SUM(a)+SUM(b) = SUM(a+b)
B. SUM(COALESCE(a,0))+SUM(COALESCE(b,0)) = SUM(a+b)
C. SUM(a)+SUM(b) = SUM(COALESCE(a,0)+COALESCE(b,0))
D. SUM(COALESCE(a,0))+SUM(COALESCE(b,0)) =
SUM(COALESCE(a,0)+COALESCE(b,0))
Answer: D

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 98:
Similar types of operations are always performed by which of the following SQL
clauses?
A. QUALIFY and HAVING
B. DISTINCT and QUALIFY
C. HAVING and GROUP BY
D. HAVING and DISTINCT
Answer: A
QUESTION 99:
Certkiller .com has an EMPLOYEE table with columns name, and salary. A total
salary report for the employees with a salary greater than the average salary is
generated by which two SQL statements? (Choose two)
A. SEL SUM(salary) FROM EMPLOYEE ,(SEL AVG(salary) as avg_sal FROM
EMPLOYEE) e WHERE SALARY &gt; avg_sal;
B. SEL SUM(salary) FROM EMPLOYEE HAVING salary &gt; AVG(salary);
C. SEL SUM(salary) FROM EMPLOYEE HAVING salary &gt; (SEL AVG(salary) FROM EMPLOYEE);
D. SEL SUM(salary) FROM EMPLOYEE e WHERE salary &gt; (SEL AVG(salary) FROM EMPLOYEE);
E. SEL SUM(avg_sal) FROM EMPLOYEE ,(SEL AVG(salary) as avg_sal FROM
EMPLOYEE HAVING salary &gt; avg_sal) e;
Answer: A,D
QUESTION 100:
Employee_ID Name Salary Dept_No 1 Miller 10 2 2 Miller 20 2 3 Hurd 40 3 4
Stevens 10 2
SELECT COUNT(*) FROM employee GROUP BY name, dept_no HAVING
COUNT(*) &gt; 1;
After considering the table and the query shown above, what will the number of
rows in the result set be?
A. 1
B. 2
C. 3
D. 30
E. 80
Answer: A

Actualtests.com - The Power of Knowing

NR0-013
QUESTION 101:
Which three items are affected if you choose ANSI instead of Teradata mode?
(Choose three.)
A. data conversions
B. rounding behavior
C. case sensitivity defaults
D. transaction protocol behavior
Answer: A,C,D
QUESTION 102:
The account you are currently using will be displayed via which command?
A. HELP USER;
B. HELP SESSION;
C. HELP ACCOUNT;
D. EXPLAIN ACCOUNT;
E. SELECT 'ACCOUNT';
Answer: B
QUESTION 103:
With reference to the ACCOUNT function, which two statements are correct?
(Choose two.)
A. It has no arguments.
B. It cannot be used in a macro.
C. Value is provided by the parser.
D. It must be coded between quotes.
Answer: A,C
QUESTION 104:
Which of the following is provided by the EXPLAIN output for user assistance in
query analysis? (Choose two.)
A. which steps may be processed in parallel
B. what statistics should be collected on a column
C. accurate time measurements for query processing
D. details of which indexes, if any, will be used to process the query
E. recommendations to improve the query based on timing and sizing
Actualtests.com - The Power of Knowing

NR0-013

Answer: A,D
QUESTION 105:
Which is an accessible option with Global Temporary tables?
A. Identity Column
B. Collect Statistics
C. Permanent Journaling
D. Referential Constraints
Answer: B
QUESTION 106:
Which table type would recommended for users who need to share a table
definition, but not the data?
A. Volatile
B. Derived
C. Permanent
D. Global Temporary
Answer: D
QUESTION 107:
What are three accurate statements pertaining to Global and Volatile Temporary
tables? (Choose three.)
A. Global Temporary table definitions are maintained in the Data Dictionary.
B. Volatile Temporary tables must be created before they can be materialized.
C. Volatile Temporary tables are materialized in spool space and their definition is
maintained in cache.
D. Volatile Temporary table space requirements are charged against the user's allocation
of temporary space.
Answer: A,B,C
QUESTION 108:
What is a syntactically correct example of a valued CASE expression?
A.SELECT CASE IF x=1 THEN 'Yes'ELSE NULL END FROM Table_A;
B.SELECT CASE x WHEN 1 THEN 'Yes'ELSE 'No'END FROM Table_A;
Actualtests.com - The Power of Knowing

NR0-013
C.SELECT CASE WHEN x=1 THEN 'yES'ELSE 'No'END FROM Table_A;
D.SELECT CASE SEARCH x FOR 1 IF=THEN 'Yes' ELSE 'No' FROM Table_A;
Answer: B
QUESTION 109:
Considering the subsequent SQL statement, which of the following is true if you
assume that there are no rows in Table_T where x is null?
SELECT COUNT(*) FROM Table_T WHERE x = CASE WHEN y=2 THEN 1
A. The SQL statement is not syntactically correct because no ELSE statement exists
within the CASE statement.
B. The SQL statement is not syntactically correct because a CASE statement cannot be
used within a WHERE clause.
C. The SQL statement is syntactically correct and a count of the number of rows from
Table_T where y=2 and x=1 will be returned.
D. The SQL statement is syntactically correct and a count of the number of rows from
Table_T where either y=2 or x=1 will be returned.
Answer: C
QUESTION 110:
What term is equivalent to the following expression?
CASE WHEN x = y THEN NULL ELSE x END
A. NULLIF (x, y)
B. COALESCE (x, y)
C. ZEROIFNULL (x, y)
D. COMPRESS NULL (x, y)
Answer: A
QUESTION 111:
Given the following expression, what is returned if only the HomePhone is NULL?
SELECT Name, COALESCE (HomePhone, OfficePhone, MessageService) FROM
PhoneDir;
A. Name with '?'
B. an error message
C. Name with OfficePhone
D. Name with OfficePhone and MessageService
Answer: C
Actualtests.com - The Power of Knowing

NR0-013

QUESTION 112:
Which statement is true if you are given the following set of SQL statements:
CREATE MULTISET TABLE t1 (a INTEGER, b INTEGER) PRIMARY INDEX
(a); INSERT INTO t1 VALUES (1,1); INSERT INTO t1 VALUES (1,2); UPDATE t1 SET b = b + 1 WHERE
a = 1;
A. The INSERTs and the UPDATE succeed.
B. The second INSERT fails because it would create a duplicate primary index value.
C. The INSERTs succeed but the UPDATE fails because the syntax is incorrect.
D. The INSERTs succeed but the UPDATE fails because it would create a duplicate row.
Answer: A
QUESTION 113:
Consider the following statement:
UPDATE T1 SET ColA = ColB IS NOT NULL;
Which of the following are three situations that the query will succeed in? (Choose
three.)
A. ColA is defined as INTEGER and ColB is defined as DATE .
B. ColA is defined as TIMESTAMP and ColB is defined as DATE .
C. ColA is defined as INTEGER and ColB is defined as SMALLINT .
D. ColA is defined as CHAR(2) and ColB is defined as VARCHAR(2) .
Answer: A,C,D
QUESTION 114:
CREATE MACRO dept_budget (deptno INT, budgamt DEC(10,2))AS (MERGE
INTO department USING (SELECT :deptno, dept_name, :budgamt FROM
dept_name_assignment WHERE department_number = :deptno) AS
Dept(deptnum, deptname, budget) ON Dept.deptnum =
department.department_number WHEN MATCHED THEN UPDATE SET
budget_amount = Dept.budget, department_name = Dept.deptname WHEN NOT
MATCHED THEN INSERT
VALUES (Dept.dptnum, Dept.deptname, Dept.budget, NULL););
Which four of the following statements are true regarding the execution the
following macro? (Choose four.)
A. The primary index of the target table must be unique.
B. The AS clause within the macro specifies the name of the source table.
C. The USING subquery may return at most a single row.
Actualtests.com - The Power of Knowing

NR0-013
D. The ON clause must contain the primary index of the target table.
E. If zero rows are returned by the subquery, neither the update nor the insert occurs.
Answer: B,C,D,E
QUESTION 115:
The following query, where birthdate has the DATE data type, will produce which
result?
SELECT (CURRENT_DATE - birthdate) FROM birthrecord;
A. the day of birth
B. the month of birth
C. the days since birth
D. the years since birth
E. the months since birth
Answer: C
QUESTION 116:
Which of the following is a result generated by SELECT CAST(100000.6 AS
SMALLINT)?
A. 100000
B. 100001
C. 100000.6
D. Error: Numeric overflow occurred during computation.
Answer: D
QUESTION 117:
Of the following statements, which one is true?
A. When an integer value is added to a float value, neither is converted.
B. When an integer value is added to a float value, the integer is first converted to a float.
C. When an integer value is added to a float value, the float is first converted to an
integer.
D. You cannot add different data types, so must first use the CAST function to make
them the same.
Answer: B
QUESTION 118:

Actualtests.com - The Power of Knowing

NR0-013
What is the result displayed by SELECT 3 / 4 * 100.00 ?
A. .00
B. .75
C. 75
D. 75.00
Answer: A
QUESTION 119:
Consider the following SQL statement:
SELECT name, lot, weight FROM participants WITH SUM(weight) BY lot WITH
AVG(weight), SUM(weight) ORDER BY name, lot;
Which result set is returned by this SQL statement?
A. a list of all participants with their total weight and a subtotal, grand total and average
weight for all lots
B. a list of all participants with average weight for each lot and both the average and total
weight for all lots
C. a list of all participants with average weight and subtotal of weight for each lot and a
total weight for all lots
D. a list of all participants with a subtotal of weight for each lot and both the average and
total weight for all lots
Answer: D
QUESTION 120:
DISTINCT, in the query: "SELECT DISTINCT dept_num, job_code FROM
employee;" applies to which column(s)?
A. job_code
B. dept_num
C. dept_num and job_code
D. It does not apply to either column as the query needs parentheses.
Answer: C

Actualtests.com - The Power of Knowing

Das könnte Ihnen auch gefallen