Craig Willey
Quiz von , erstellt am more than 1 year ago

College C192 Databases Quiz am C192 / SQL , erstellt von Craig Willey am 30/06/2020.

8
0
0
Craig Willey
Erstellt von Craig Willey vor mehr als 4 Jahre
Schließen

C192 / SQL

Frage 1 von 17

1

The SQL command that enables you to make changes in the data is ____.

Wähle eine der folgenden:

  • INSERT

  • SELECT

  • COMMIT

  • UPDATE

Erklärung

Frage 2 von 17

1

To list all the contents of the PRODUCT table, you would use ____.

Wähle eine der folgenden:

  • LIST * FROM PRODUCT;

  • SELECT * FROM PRODUCT;

  • DISPLAY * FROM PRODUCT;

  • SELECT ALL FROM PRODUCT;

Erklärung

Frage 3 von 17

1

Which command would you use when making corrections to the PRODUCT table?

Wähle eine der folgenden:

  • CHANGE PRODUCT
    SET P_INDATE = '01/18/2004'
    WHERE P_CODE = '13-Q2/P2';

  • ROLLBACK PRODUCT
    SET P_INDATE = '01/18/2004'
    WHERE P_CODE = '13-Q2/P2';

  • EDIT PRODUCT
    SET P_INDATE = '01/18/2004'
    WHERE P_CODE = '13-Q2/P2';

  • UPDATE PRODUCT
    SET P_INDATE = '01/18/2004'
    WHERE P_CODE = '13-Q2/P2';

Erklärung

Frage 4 von 17

1

Which command is used to select partial table contents?

Wähle eine der folgenden:

  • SELECT <column(s)>
    FROM <Table name>
    WHERE <Item>;

  • LIST <column(s)>
    FROM <Table name>
    WHERE <Conditions>;

  • SELECT <column(s)>
    FROM <Table name>
    WHERE <Conditions>;

  • LIST<column(s)>
    FROM <Table name>
    WHERE <Item>;

Erklärung

Frage 5 von 17

1

Which query will output the table contents when the value of V_CODE is less than or equal to 21344?

Wähle eine der folgenden:

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE <> 21344;

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE <=21344;

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE => 21344;

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE = 21344;

Erklärung

Frage 6 von 17

1

What is the SQL syntax requirement to list the table contents for either V_CODE = 21344 or V_CODE = 24288?

Wähle eine der folgenden:

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE = 21344
    OR V_CODE <= 24288

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE = 21344
    OR V_CODE => 24288

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE = 21344
    OR V_CODE > 24288

  • SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODE
    FROM PRODUCT
    WHERE V_CODE = 21344
    OR V_CODE = 24288

Erklärung

Frage 7 von 17

1

What is the command used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the Product table in ascending order by P_PRICE?

Wähle eine der folgenden:

  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
    FROM PRODUCT
    SEQUENCE BY P_PRICE;

  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
    FROM PRODUCT
    LIST BY P_PRICE;

  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
    FROM PRODUCT
    ORDER BY P_PRICE;

  • SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE
    FROM PRODUCT
    ASCENDING BY P_PRICE;

Erklärung

Frage 8 von 17

1

The basic SQL aggregate function that gives the number of rows containing not null values for the given column is ____.

Wähle eine der folgenden:

  • COUNT

  • MIN

  • MAX

  • SUM

Erklärung

Frage 9 von 17

1

What is the command to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_AREACODE, V_PHONE, and V_CONTACT fields from the VENDOR table where the value of V_CODE match?

Wähle eine der folgenden:

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE <> VENDOR.V_CODE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE = VENDOR.V_CODE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE <= VENDOR.V_CODE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE => VENDOR.V_CODE;

Erklärung

Frage 10 von 17

1

What is the command to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_AREACODE, V_PHONE and V_CONTACT fields from the VENDOR table, where the value of V_CODE match and the output is ordered by the Price?

Wähle eine der folgenden:

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE <> VENDOR.V_CODE;
    ORDER BY P_PRICE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE => VENDOR.V_CODE;
    ORDER BY P_PRICE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE <= VENDOR.V_CODE;
    ORDER BY P_PRICE;

  • SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE
    FROM PRODUCT, VENDOR
    WHERE PRODUCT.V_CODE = VENDOR.V_CODE;
    ORDER BY P_PRICE;

Erklärung

Frage 11 von 17

1

To delete a row from the PRODUCT table, use the ____ command.

Wähle eine der folgenden:

  • KILL

  • DELETE

  • COMMIT

  • ERASE

Erklärung

Frage 12 von 17

1

ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. A special operator used to check whether an attribute value is null is ____.

Wähle eine der folgenden:

  • BETWEEN

  • IS NULL

  • LIKE

  • IN

Erklärung

Frage 13 von 17

1

The ____ command is used to modify the table by deleting a column.

Wähle eine der folgenden:

  • DROP

  • ALTER

  • DELETE

  • ERASE

Erklärung

Frage 14 von 17

1

The ____ function is used to find the highest value in a table column.

Wähle eine der folgenden:

  • MAX

  • TOTAL

  • SUM

  • TOP

Erklärung

Frage 15 von 17

1

UPDATE tablename
*****
[WHERE conditionlist];
What command replaces the ***** in the above statement?

Wähle eine der folgenden:

  • SET columnname = expression

  • columnname = expression

  • expression = columnname

  • LET columnname = expression

Erklärung

Frage 16 von 17

1

If you wish to perform an inner join based on only one common attribute, you might use the ____ clause.

Wähle eine der folgenden:

  • OF

  • USING

  • HAS

  • JOIN ON

Erklärung

Frage 17 von 17

1

In a subquery, which query is executed first?

Wähle eine der folgenden:

  • Leftmost

  • Rightmost

  • Innermost

  • Outermost

Erklärung