Free TE0-122 Exam Braindumps (page: 17)

Page 16 of 38

Which ANSI SQL-2003 compliant function should be used when determining the length of a string?

  1. COUNT
  2. CHAR_COUNT
  3. CHARACTERS
  4. CHARACTER_LENGTH

Answer(s): B



Given the following definition of a table:

CREATE TABLE trans
( trans_id INTEGER NOT NULL
, unit_price DECIMAL(10, 2)
, qnty INTEGER
, t_time TIMESTAMP(6) NOT NULL)
PRIMARY INDEX (trans_id);

The table has a row that was inserted as follows:
INSERT trans VALUES
(45912, 12.99, NULL, CURRENT_TIMESTAMP);
The following statement is submitted:
SELECT COALESCE(unit_price, 0)*qnty
FROM trans WHERE trans_id=45912 AND unit_price IS NOT NULL;

What is the result?

  1. NULL
  2. 0.00
  3. 12.99
  4. no rows returned

Answer(s): D



Given the following command:
HELP STATISTICS sales.orders

What is a valid output and what information is provided?

  1. Date Time Unique values Column names
    ------- ------- -------------- ------------
    10/15/09 22:39:08 156798 Order Id
    Displays summary attributes for statistics that have been collected in the Data Dictionary for the
    specified data table.
  2. Primary
    or
    Date Time Secondary Unique Values
    -------- -------- ---------- --------------
    10/15/09 22:39:08 P 16780
    Displays the attributes for an index column including whether it is a primary or secondary index and the number of unique values within the column.
  3. Date Time Table/View/JI/HI Kind Unique Values
    -------- -------- ---------------- ---- -------------
    10/15/09 02:19:22 Product T 2500
    10/15/09 02:20:56 Active Orders V 29000
    10/15/09 02:23:47 Product_Id JI 17000
    10/15/09 02:19:22 Order_Id HI 11409
    Displays attributes for statistics collected for all tables, views, Join Indexes and Hash Indexes.
  4. Date Time Column Name Unique Values
    -------- -------- ------------ -------------
    10/15/09 17:41:54 Order_Number 150986
    Displays the attributes for the columns making up the Hash Index.

Answer(s): D



Given the following:

SELECT Department
, Employee_No
, SUM(Sales_Amt)
FROM SALES
WHERE Department IN ('Westcoast', 'Central', 'Eastcoast')

What is needed to make this query run without error?

  1. GROUP BY 1, 2
  2. ORDER BY 1, 2
  3. GROUP BY 1 ORDER BY 1, 2
  4. modify the WHERE clause to includeEmployee_No

Answer(s): C






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

TE0-122 Discussions & Posts