Free TE0-122 Exam Braindumps (page: 14)

Page 13 of 38

Company Z wants to identify the highest salaried employee in each department for a possible mentoring program.
Which query will generate the desired results?

  1. SELECT last_name
    , department_number AS deptno
    , salary_amount
    FROM employee ee
    WHERE salary_amount =
    (SELECT MAX (salary_amount)
    FROM employee em);
  2. SELECT last_name
    , department_number AS deptno
    , salary_amount
    FROM employee ee
    WHERE salary_amount =
    (SELECT MAX (salary_amount)
    FROM employee em
    WHERE ee.department_number = em.department_number);
  3. SELECT last_name
    , department_number AS deptno
    , salary_amount
    FROM employee ee
    WHERE salary_amount =
    (SELECT MAX (salary_amount)
    FROM employee em
    WHERE ee.employee = salary_amount);
  4. SELECT last_name
    , department_number AS deptno
    , salary_amount
    FROM employee ee
    WHERE salary_amount =
    (SELECT MAX (salary_amount)
    FROM employee em
    WHERE ee.salary_amount = em.salary_amount);

Answer(s): D



Why would adding a debug variable be useful when writing a stored procedure?

  1. It reduces the number of SET statements.
  2. It provides information on the compiler.
  3. It decreases the frequency of recompilation.
  4. It simplifies usage of various levels of tracing.

Answer(s): C



A user wants to create two copies of the following table:

CREATE TABLE table_1(
column1 INTEGER NOT NULL
, column2 INTEGER NOT NULL
, column3 DATE FORMAT 'YYYY-MM-DD'
, column4 INTEGER DEFAULT 1000
, FOREIGN KEY (column2) REFERENCES WITH NO CHECK OPTION Parent_table1(column1))
PRIMARY INDEX (column1)
PARTITION BY RANGE_N(column3
BETWEEN DATE '2009-01-01' AND DATE '2011-12-31' EACH INTERVAL '1' DAY);
COLLECT STATISTICS ON table_1 INDEX (column1);
COLLECT STATISTICS ON table_1 COLUMN PARTITION;
CREATE TABLE table_2 AS table_1 WITH DATA AND STATISTICS;
CREATE TABLE table_3 AS (SELECT * FROM table_1) WITH DATA AND STATISTICS;

Which two statements are true about these two CREATE TABLE AS statements? (Choose two.)

  1. table_3 will not be partitioned.
  2. table_3 will have the DEFAULT column attribute from table_1.
  3. table_2 will have the referential integrity column from table_1.
  4. table_2 will have statistics on the system-derived PARTITION column from table_1.

Answer(s): A,C



The stores table contains the following data:

store_id city state
----------- ------------------------- -----
1 Big Sur CA
2 Monterey CA
3 Napa CA
4 Oceanside CA
5 Rancho Bernardo CA
6 Sonoma CA
7 Algiers Point LA
8 New Orleans LA
9 Charlotte NC
10 North Wilkesboro NC
11 Midway UT
12 Moab UT
13 Park City UT
14 Springdale UT
15 Charleston WV
16 White Sulfur Springs WV
Given the following SQL statement:
SELECT store_id
, city
, state
, SAMPLEID
FROM stores
SAMPLE 0.50, 0.25, 0.25
ORDER BY 4;

How many rows are returned?

  1. 1
  2. 4
  3. 5
  4. 15
  5. 16

Answer(s): B






Post your Comments and Discuss TeraData TE0-122 exam with other Community members:

TE0-122 Discussions & Posts