¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Oracle Vengence

Brandon Gagon 20 preguntas

Hacer el test

Preguntas del test (20)

  1. 1The PRODUCTS table has these columns:

    PRODUCT_ID NUMBER(4)
    PRODUCT_NAME VARCHAR2(45)
    PRICE NUMBER(8, 2)

    Evaluate this SQL statement:

    SELECT *
    FROM PRODUCTS
    ORDER BY price, product_name;

    What is true about the SQL statement?
    1. AThe results are not sorted.
    2. BThe results are sorted numerically.
    3. CThe results are sorted alphabetically.
    4. DThe results are sorted numerically and then alphabetically.
  2. 2Examine the structure and data in the PRICE_LIST table:

    Name . Null . Type
    ———————-
    PROD_ID . NOT NULL . NUMBER(3)
    PROD_PRICE . VARCHAR2(10)

    PROD_ID PROD_PRICE
    ———————-
    100 $234.55
    101 $6,509.75
    102 $1,234

    You plan to give a discount of 25% on the product price and need to display the discount amount in the same format as the PROD_PRICE.

    Which SQL statement would give the required result?
    1. ASELECT TO_CHAR(prod_price* .25, ‘$99, 999.99’) FROM PRICE_LIST;
    2. BSELECT TO_CHAR(TO_NUMBER(prod_price)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
    3. CSELECT TO_CHAR(TO_NUMBER(prod_price, ‘$99, 999.99’)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
    4. DSELECT TO_NUMBER(TO_NUMBER(prod_price, ‘$99, 999.99’)* .25, ‘$99, 999.00’) FROM PRICE_LIST;
  3. 3Which statement successfully adds a new column, ORDER_DATE, to the table ORDERS?
    1. AALTER TABLE ORDERS ADD COLUMN ORDER_DATE DATE;
    2. BALTER TABLE ORDERS ADD ORDER_DATE (DATE);
    3. CALTER TABLE ORDERS ADD ORDER_DATE DATE;
    4. DALTER TABLE ORDERS NEW COLUMN ORDER_DATE TYPE DATE;
  4. 4You want to display each project’s start date as the day, week, number, and year. Which statement will give output like the following?

    Tuesday Week 23, 2008
    1. ASELECT proj_id, TO_CHAR(start_date, 'DOW Week WOY YYYY') FROM projects;
    2. BSELECT proj_id, TO_CHAR(start_date,'Day'||' Week'||' WOY, YYYY') FROM projects;
    3. CSELECT proj_id, TO_CHAR(start_date, 'Day" Week" WW, YYYY') FROM projects;
    4. DSELECT proj_id, TO_CHAR(start_date, 'Day Week# , YYYY') FROM projects;
    5. EYou can’t calculate week numbers with Oracle.
  5. 5You need to calculate the number of days from 1st January 2007 till date . Dates are stored in the default format of dd-mon-rr.

    Which two SQL statements would give the required output?

    (Choose two.)
    1. ASELECT SYSDATE – TO_DATE(’01-JANUARY-2007′) FROM DUAL;
    2. BSELECT TO_CHAR(SYSDATE, ‘DD-MON-YYYY’) – ’01-JAN-2007′ FROM DUAL;
    3. CSELECT SYSDATE – ’01-JAN-2007′ FROM DUAL;
    4. DSELECT SYSDATE – TO_DATE(’01/JANUARY/2007′) FROM DUAL;
    5. ESELECT TO_DATE(SYSDATE, ‘DD/MONTH/YYYY’) – ’01/JANUARY/2007′ FROM DUAL;
  6. 6What is the default precision for fractional seconds in a TIMESTAMP datatype column?
    1. A0
    2. B9
    3. C2
    4. D6
  7. 7Examine this statement:

    SELECT student_id, gpa FROM student_grades WHERE gpa > &&value; You run the statement once, and when prompted you enter a value of 2.0. A report is produced.

    What happens when you run the statement a second time?
    1. AAn error is returned.
    2. BA report is produced that matches the first report produced.
    3. CYou are asked whether you want a new value or if you want to run the report based on the previous value.
    4. DYou are prompted to enter a new value.
  8. 8he EMPLOYEES table has EMPLOYEE_ID, DEPARTMENT_ID, and FULL_NAME columns. The DEPARTMENTS table has DEPARTMENT_ID and DEPARTMENT_NAME columns.

    Which two of the following queries return the department ID, name, and employee name, listing department names even if there is no employee assigned to that department?
    1. ASELECT d.department_id, d.department_name, e.full_name FROM departments d LEFT OUTER JOIN employees e ON (d.department_id = e.department_id);
    2. BSELECT department_id, department_name, full_name FROM departments NATURAL LEFT JOIN employees;
    3. CSELECT d.department_id, d.department_name, e.full_name FROM departments d NATURAL LEFT OUTER JOIN employees e;
    4. DSELECT d.department_id, d.department_name, e.full_name FROM departments d LEFT OUTER JOIN employees e USING (d.department_id);
  9. 9Which two operators are not allowed when using an outer join operator in the query?
    1. AAND
    2. BIN
    3. COR
    4. D=
  10. 10The account table contains these columns:
    ACCOUNT_ID NUMBER(12)
    NEW_BALANCE NUMBER(7,2)
    PREV_BALANCE NUMBER(7,2)
    FINANCE_CHARGE NUMBER(7,2)

    You need to create a single SELECT statement to accomplish these requirements:
    - Display accounts that have a new balance that is less than the previous balance.
    - Display accounts that have a finance charge that is less than $25.00.
    - Display accounts that have no finance charge.

    Evaluate this statement:
    SELECT account_id
    FROM account
    WHERE new_balance < prev_balance
    AND NVL(finance_charge, 0) < 25;

    How many of the three requirements will this SELECT statement accomplish?
    1. Aone of the requirements
    2. Btwo of the requirements
    3. Cnone of the requirements
    4. Dall of the requirements

Información

Descripción
Test sobre Oracle Vengence, creado por Brandon Gagon el 23/04/2019.
Idioma
English
Visitas
11
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?