单选题The 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? ()A The results are not sor

题目
单选题
The 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? ()
A

The results are not sorted.

B

The results are sorted numerically.

C

The results are sorted alphabetically.

D

The results are sorted numerically and then alphabetically.


相似考题
参考答案和解析
正确答案: A
解析: 暂无解析
更多“The PRODUCTS table has these columns: PRODUCT_ID NUMBER(4) P”相关问题
  • 第1题:

    Examine the SQL statement that creates ORDERS table:CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN (‘CREDIT‘, ‘CASH‘)), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date));For which columns would an index be automatically created when you execute the above SQL statement? ()

    A. SER_NO

    B. ORDER_ID

    C. STATUS

    D. PROD_ID

    E. ORD_TOTAL

    F. composite index on ORDER_ID and ORDER_DATE


    参考答案:A, F

  • 第2题:

    Make a function to print an HTML table of r rows and c cols; fill the cells with up to n consecutive

    numbers (if n is greater than the produce of r and c, discard the rest). Ensure that all rows have the

    same number of columns.


    正确答案:
     

  • 第3题:

    In which of the following situations should correlation names be used?()

    • A、A table referenced in the FROM clause has no indexed column.
    • B、The table referenced in the FROM clause has more than 200 columns.
    • C、Two or more tables in the FROM clause have identical column names.
    • D、The FROM clause contains two or more tables in the SELECT statement.

    正确答案:C

  • 第4题:

    Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()

    • A、 It would be created only if a unique index is manually created first.
    • B、 It would be created and would use an automatically created unique index.
    • C、 It would be created and would use an automatically created nonunique index.
    • D、 It would be created and remains in a disabled state because no index is specified in the command.

    正确答案:B

  • 第5题:

    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()

    • A、SER_NO
    • B、ORDER_ID
    • C、STATUS
    • D、PROD_ID
    • E、ORD_TOTAL
    • F、composite index on ORDER_ID and ORDER_DATE

    正确答案:A,F

  • 第6题:

    多选题
    View the Exhibit and examine the data in the PRODUCT INFORMATION table. Which two tasks would require subqueries? ()
    A

    displaying the minimum list price for each product status

    B

    displaying all supplier IDs whose average list price is more than 500

    C

    displaying the number of products whose list prices are more than the average list price

    D

    displaying all the products whose minimum list prices are more than the average list price of products having the product status orderable

    E

    displaying the total number of products supplied by supplier 102071 and having product status OBSOLETE


    正确答案: C,D
    解析: 暂无解析

  • 第7题:

    单选题
    The EMPLOYEES table has these columns: LAST NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATE Management wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement: ALTER TABLE EMPLOYEES MODIFY ( SALARY DEFAULT 5000); What is true about your ALTER statement?()
    A

    Column definitions cannot be altered to add DEFAULT values.

    B

    A change to the DEFAULT value affects only subsequent insertions to the table.

    C

    Column definitions cannot be altered at add DEFAULT values for columns with a NUMBER data type.

    D

    All the rows that have a NULL value for the SALARY column will be updated with the value 5000.


    正确答案: B
    解析: 暂无解析

  • 第8题:

    多选题
    Examine the SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL STATUS VARCHARD2(10) CHECK (status IN ('CREDIT','CASH')), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date)); For which columns would an index be automatically created when you execute the aboveSQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    Composite index on ORDER_ID and ORDER_DATE


    正确答案: C,A
    解析: 暂无解析

  • 第9题:

    单选题
    Evaluate the following SQL statement used to create the PRODUCTS table:   CREATE TABLE products (product_id NUMBER(3) PRIMARY KEY, product_desc VARCHAR2(25), qtyNUMBER(8,2), rate NUMBER(10,2), total_value AS ( qty * rate)) PARTITION BY RANGE (total_value) (PARTITION p1 VALUES LESS THAN (100000), PARTITION p2 VALUES LESS THAN  (150000), PARTITION p3 VALUES LESS THAN (MAXVALUE))  COMPRESS FOR ALL OPERATIONS;   Which statement is true regarding this command?()
    A

     It executes successfully but partition pruning cannot happen for this partition key.

    B

     It produces an error because the TOTAL_VALUE column cannot be used as a partition key.

    C

     It produces an error because compression cannot be used for the TOTAL_VALUE partition key. 

    D

     It executes successfully but the values in the TOTAL_VALUE column would not be physically stored in the partitions.


    正确答案: C
    解析: 暂无解析

  • 第10题:

    多选题
    Evaluate the following statements:   CREATE TABLE purchase_orders (po_id NUMBER(4),  po_date TIMESTAMP, supplier_id NUMBER(6), po_total NUMBER(8,2),  CONSTRAINT order_pk PRIMARY KEY(po_id)) PARTITION BY RANGE(po_date)  (PARTITION Q1 VALUES LESS THAN (TO_DATE(?1-apr-2007?d-mon-yyyy?), PARTITION Q2 VALUES LESS THAN  (TO_DATE(?1-jul-2007?d-mon-yyyy?),  PARTITION Q3 VALUES LESS THAN(TO_DATE(?1-oct - 2007?d-mon-yyyy?), PARTITION Q4 VALUES LESS THAN (TO_DATE(?1-jan-2008?d-mon-yyyy?));  CREATE TABLE purchase_order_items (po_id NUMBER(4) NOT NULL, product_id NUMBER(6) NOT NULL, unit_price NUMBER(8,2), quantity NUMBER(8), CONSTRAINT po_items_fk FOREIGN KEY  (po_id) REFERENCES purchase_orders(po_id)) PARTITION BY REFERENCE(po_items_fk);   What are the two consequences of the above statements?()
    A

    Partitions of PURCHASE_ORDER_ITEMS have system-generated names.

    B

    Both PURCHASE_ORDERS and PURCHASE_ORDER_ITEMS tables are created with four partitions each.

    C

    Partitions of the PURCHASE_ORDER_ITEMS table exist in the same tablespaces as the partitions of the PURCHASE_ORDERS table.

    D

    The PURCHASE_ORDER_ITEMS table inherits the partitioning key from the parent table by  automatically duplicating the key columns.

    E

    Partition maintenance operations performed on the PURCHASE_ORDER_ITEMS table are automatically reflected in the PURCHASE_ORDERS table.


    正确答案: A,B
    解析: 暂无解析

  • 第11题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: A,F
    解析: 暂无解析

  • 第12题:

    单选题
    You need to create a table named ORDERS that contain four columns: 1. an ORDER_ID column of number data type 2. aCUSTOMER_ID column of number data type 3. an ORDER_STATUS column that contains a character data type 4. aDATE_ORDERED column to contain the date the order was placed. When a row is inserted into the table, if no value is provided when the order was placed, today's date should be used instead. Which statement accomplishes this?()
    A

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    B

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    C

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE DEFAULT SYSDATE);

    D

    CREATE OR REPLACE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status VARCHAR2 (10), date_ordered DATE = SYSDATE);

    E

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE = SYSDATE);

    F

    CREATE TABLE orders ( order_id NUMBER (10), customer_id NUMBER (8), order_status NUMBER (10), date_ordered DATE DEFAULT SYSDATE);


    正确答案: D
    解析: 暂无解析

  • 第13题:

    The STUDENT_GRADES table has these columns:The registrar has asked for a report on the average grade point average (GPA) for students enrolled during semesters that end in the year 2000. Which statement accomplish this?()

    A.

    B.

    C.

    D.

    E.

    F.


    参考答案:D

  • 第14题:

    The EMP table contains these columns:EMPLOYEE_ID NUMBER(4)EMPNAME VARCHAR2 (25)SALARY NUMBER(9,2)HIRE_DATE DATEYou query the database with this SQL statement:SELECT empname,hire_date HIREDATE, salaryFROM EMPORDER BY hire_date;How will the results be sorted?()

    A.randomly

    B.ascending by date

    C.descending by date

    D.ascending alphabetically

    E.descending alphabetically


    参考答案:B

  • 第15题:

    You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()

    • A、Each extra column in the copy with more columns must not have a default value
    • B、Columns that are common to both versions of the table must be defined in the same order on the master and the slave
    • C、The slave database cannot have more columns than the master. Only the master database can have more columns
    • D、Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either server
    • E、The master database cannot have more columns than the slave. Only the slave deatbase can have more columns

    正确答案:B,D

  • 第16题:

    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()

    • A、randomly
    • B、ascending by date
    • C、descending by date
    • D、ascending alphabetically
    • E、descending alphabetically

    正确答案:B

  • 第17题:

    单选题
    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()
    A

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: A
    解析: 暂无解析

  • 第18题:

    多选题
    You need to replicate a table from a master to a slave. The master and slave copies of the table will have different number of columns. Which two conditions must be true?()
    A

    Each extra column in the copy with more columns must not have a default value

    B

    Columns that are common to both versions of the table must be defined in the same order on the master and the slave

    C

    The slave database cannot have more columns than the master. Only the master database can have more columns

    D

    Columns that are common to both versions of the table must come first in the table definition, before any additional columns are additional columns are defined on either server

    E

    The master database cannot have more columns than the slave. Only the slave deatbase can have more columns


    正确答案: B,C
    解析: 暂无解析

  • 第19题:

    单选题
    The EMP table contains these columns: EMPLOYEE_ID NUMBER(4) EMPNAME VARCHAR2 (25) SALARY NUMBER(9,2) HIRE_DATE DATE You query the database with this SQL statement: SELECT empname,hire_date HIREDATE, salary FROM EMP ORDER BY hire_date; How will the results be sorted?()
    A

    randomly

    B

    ascending by date

    C

    descending by date

    D

    ascending alphabetically

    E

    descending alphabetically


    正确答案: D
    解析: 暂无解析

  • 第20题:

    单选题
    The EMPLOYEES table has these columns:LAST_NAME VARCHAR2(35) SALARY NUMBER(8,2) HIRE_DATE DATEManagement wants to add a default value to the SALARY column. You plan to alter the table by using this SQL statement:ALTER TABLE EMPLOYEES MODIFY (SALARY DEFAULT 5000);Which is true about your ALTER statement?()
    A

    Column definitions cannot be altered to add DEFAULT values.

    B

    A change to the DEFAULT value affects only subsequent insertions to the table.

    C

    Column definitions cannot be altered to add DEFAULT values for columns with a NUMBER data type.

    D

    All the rows that have a NULL value for the SALARY column will be updated with the value 5000.


    正确答案: B
    解析: 暂无解析

  • 第21题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: B,A
    解析: 暂无解析

  • 第22题:

    单选题
    Evaluate the CREATE TABLE statement:   CREATE TABLE products   (product_id NUMBER (6)  CONSTRAINT prod_id_pk PRIMARY KEY,  product_name VARCHAR2 (15));   Which statement is true regarding the PROD_ID_PK constraint?()
    A

     It would be created only if a unique index is manually created first.

    B

     It would be created and would use an automatically created unique index.

    C

     It would be created and would use an automatically created nonunique index.

    D

     It would be created and remains in a disabled state because no index is specified in the command.


    正确答案: D
    解析: 暂无解析

  • 第23题:

    单选题
    Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns: LAST NAME VARCNAR2(35) NOT NULL SALARY NUMBER(9,2) NOT NULL COMMISION_PCT NUMBER(4,2) Which statement ensures that a value is displayed in the calculated columns for all employees?()
    A

    SELECT last_name, 12*salary* commission_pct FROM emp;

    B

    SELECT last_name, 12*salary* (commission_pct,0) FROM emp;

    C

    SELECT last_name, 12*salary*(nvl(commission_pct,0)) FROM emp;

    D

    SELECT last_name, 12*salary*(decode(commission_pct,0)) FROM emp;


    正确答案: B
    解析: 暂无解析