. .
Quiz by , created more than 1 year ago

asdf Quiz on Chapter 7 (Multiple Choice CIS 3365), created by . . on 22/09/2016.

626
3
0
. .
Created by . . over 7 years ago
Close

Chapter 7 (Multiple Choice CIS 3365)

Question 1 of 40

1

1. The most recent fully approved version of standard SQL prescribed by the ANSI is ____.

Select one of the following:

  • a. SQL-99

  • b. SQL-2003

  • c. SQL-4

  • d. SQL-07

Explanation

Question 2 of 40

1

2. The SQL character data format(s) is(are) ____.

Select one of the following:

  • a. CHAR and VARCHAR

  • b. VARCHAR only

  • c. Alphanumeric

  • d. CHAR only

Explanation

Question 3 of 40

1

3. The SQL command that lets you insert rows into a table is ____.

Select one of the following:

  • a. INSERT

  • b. SELECT

  • c. COMMIT

  • d. UPDATE

Explanation

Question 4 of 40

1

4. The SQL command that lets you permanently save data changes is ____.

Select one of the following:

  • a. INSERT

  • b. SELECT

  • c. COMMIT

  • d. UPDATE

Explanation

Question 5 of 40

1

5. The SQL command that lets you select attributes from rows in one or more tables is ____.

Select one of the following:

  • a. INSERT

  • b. SELECT

  • c. COMMIT

  • d. UPDATE

Explanation

Question 6 of 40

1

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

Select one of the following:

  • a. LIST * FROM PRODUCT;

  • b. SELECT * FROM PRODUCT;

  • c. DISPLAY * FROM PRODUCT;

  • d. SELECT ALL FROM PRODUCT;

Explanation

Question 7 of 40

1

7. In Oracle, the ____ command is used to change the display for a column, for example, to place a $ in front of a numeric value.

Select one of the following:

  • A) DISPLAY

  • B) FORMAT

  • C) CHAR

  • D) CONVERT

Explanation

Question 8 of 40

1

8. The SQL command that modifies an attribute’s values in one or more table’s rows is ____.

Select one of the following:

  • A) INSERT

  • B) SELECT

  • C) COMMIT

  • D) UPDATE

Explanation

Question 9 of 40

1

9. UPDATE table name*****[WHERE condition list];The ____ command replaces the ***** in the syntax of the UPDATE command, shown above.

Select one of the following:

  • a. SET columnname = expression

  • b. columnname = expression

  • c. expression = columnname

  • d. LET columnname = expression

Explanation

Question 10 of 40

1

10. An example of a command you would use when making changes to a PRODUCT table is ____.

Select one of the following:

  • a. CHANGE PRODUCTSET P_INDATE = '18-JAN-2004'WHERE P_CODE = '13-Q2/P2';

  • b. ROLLBACK PRODUCTSET P_INDATE = '18-JAN-2004'WHERE P_CODE = '13-Q2/P2';

  • c. EDIT PRODUCTSET P_INDATE = '18-JAN-2004'WHERE P_CODE = '13-Q2/P2';

  • d. UPDATE PRODUCTSET P_INDATE = '18-JAN-2004'WHERE P_CODE = '13-Q2/P2';

Explanation

Question 11 of 40

1

11. The ____ command is used to restore the table’s contents to their previous values.

Select one of the following:

  • a. COMMIT; RESTORE;

  • b. COMMIT; BACKUP;

  • c. COMMIT; ROLLBACK;

  • d. ROLLBACK;

Explanation

Question 12 of 40

1

12. Some RDBMSs, such as Oracle, automatically ____ data changes when issuing data definition commands.

Select one of the following:

  • a. COMMIT

  • b. ROLLBACK

  • c. UNSAVE

  • d. UPDATE

Explanation

Question 13 of 40

1

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

Select one of the following:

  • a. COMMIT

  • b. DELETE

  • c. ERASE

  • d. KILL

Explanation

Question 14 of 40

1

14. When you issue the DELETE FROM table name command without specifying a WHERE condition,____.

Select one of the following:

  • a. no rows will be deleted

  • b. the first row will be deleted

  • c. the last row will be deleted

  • d. all rows will be deleted

Explanation

Question 15 of 40

1

15. Which of the following is used to select partial table contents?

Select one of the following:

  • a. SELECT <column(s)>FROM <Table name>BY <Conditions>;

  • b. LIST <column(s)>FROM <Table name>BY <Conditions>;

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

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

Explanation

Question 16 of 40

1

16. The ____ command would be used to delete the table row where the P_CODE is 'BRT-345'.

Select one of the following:

  • a. DELETE FROM PRODUCTWHERE P_CODE = 'BRT-345';

  • b. REMOVE FROM PRODUCTWHERE P_CODE = 'BRT-345';

  • c. ERASE FROM PRODUCTWHERE P_CODE = 'BRT-345';

  • d. ROLLBACK FROM PRODUCTWHERE P_CODE = 'BRT-345';

Explanation

Question 17 of 40

1

17. A(n) ____ is a query that is embedded (or nested) inside another query.

Select one of the following:

  • a. alias

  • b. operator

  • c. subquery

  • d. view

Explanation

Question 18 of 40

1

18. Which query will output the table contents when the value of V_CODE is equal to 21344?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE <> 21344;

  • b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE <= 21344;

  • c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344;

  • d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE => 21344;

Explanation

Question 19 of 40

1

19. Which query will output the table contents when the value of V_CODE is not equal to 21344?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE <> 21344;

  • b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE <= 21344;

  • c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344;

  • d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE => 21344;

Explanation

Question 20 of 40

1

20. Which query will output the table contents when the value of P_PRICE is less than or equal to 10?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE P_PRICE <> 10;

  • b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE P_PRICE <= 10;

  • c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE P_PRICE => 10;

  • d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE P_PRICE = 10;

Explanation

Question 21 of 40

1

21. Which query will output the table contents when the value of the character field P_CODE is alphabetically less than 1558-QW1?

Select one of the following:

  • a. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICEFROM PRODUCT WHERE P_CODE <'1558-QW1';

  • b. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICEFROM PRODUCTWHERE P_CODE = [1558-QW1]

  • c. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICEFROM PRODUCTWHERE P_CODE = (1558-QW1)

  • d. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICEFROM PRODUCTWHERE P_CODE = {1558-QW1}

Explanation

Question 22 of 40

1

22. Which query will list all the rows in which the inventory stock dates occur on or after January 20, 2010?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATEFROM PRODUCTWHERE P_INDATE >= '20-JAN-2010'

  • b. SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATEFROM PRODUCTWHERE P_INDATE >= $20-JAN-2010$

  • c. SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATEFROM PRODUCTWHERE P_INDATE <= '20-JAN-2010'

  • d. SELECT P_DESCRIPT, P_QOH, P_MIN, P_PRICE, P_INDATEFROM PRODUCTWHERE P_INDATE >= {20-JAN-2010}

Explanation

Question 23 of 40

1

23. Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICEFROM PRODUCT;

  • b. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICEFROM PRODUCT;

  • c. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICEFROM PRODUCT;

  • d. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICEFROM PRODUCT;

Explanation

Question 24 of 40

1

24. A(n) ____ is an alternate name given to a column or table in any SQL statement.

Select one of the following:

  • a. alias

  • b. data type

  • c. stored function

  • d. Trigger

Explanation

Question 25 of 40

1

25. Which query will use the given columns and column aliases from the PRODUCT table to determine the total value of inventory held on hand and display the results in a column labeled TOTVALUE?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH*P_PRICE AS TOTVALUEFROM PRODUCT;

  • b. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH=P_PRICE AS TOTVALUEFROM PRODUCT;

  • c. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH/P_PRICE AS TOTVALUEFROM PRODUCT;

  • d. SELECT P_DESCRIPT, P_QOH, P_PRICE, P_QOH-P_PRICE AS TOTVALUEFROM PRODUCT;

Explanation

Question 26 of 40

1

26. Which query uses the correct SQL syntax to list the table contents for either V_CODE = 21344 or V_CODE = 24288?

Select one of the following:

  • a. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344OR
    V_CODE <= 24288

  • b. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344OR
    V_CODE => 24288

  • c. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344OR
    V_CODE > 24288

  • d. SELECT P_DESCRIPT, P_INDATE, P_PRICE, V_CODEFROM PRODUCTWHERE V_CODE = 21344OR
    V_CODE = 24288

Explanation

Question 27 of 40

1

27. The special operator used to check whether an attribute value is within a range of values is ____.

Select one of the following:

  • a. BETWEEN

  • b. NULL

  • c. LIKE

  • d. IN

Explanation

Question 28 of 40

1

28. The ____ special operator is used to check whether an attribute value is null.

Select one of the following:

  • a. BETWEEN

  • b. IS NULL

  • c. LIKE

  • d. IN

Explanation

Question 29 of 40

1

29. The special operator used to check for similar character strings is ____.

Select one of the following:

  • a. BETWEEN

  • b. IS NULL

  • c. LIKE

  • d. IN

Explanation

Question 30 of 40

1

30. The special operator used to check whether a subquery returns any rows is ____.

Select one of the following:

  • a. BETWEEN

  • b. EXISTS

  • c. LIKE

  • d. IN

Explanation

Question 31 of 40

1

31. The ____ command is used with the ALTER TABLE command to modify the table by deleting a column.

Select one of the following:

  • a. DROP

  • b. REMOVE

  • c. DELETE

  • d. ERASE

Explanation

Question 32 of 40

1

32. A table can be deleted from the database by using the ____ command.

Select one of the following:

  • a. DROP TABLE

  • b. DELETE TABLE

  • c. MODIFY TABLE

  • d. ERASE TABLE

Explanation

Question 33 of 40

1

33. The query used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the PRODUCT table in ascending order by P_PRICE is ____.

Select one of the following:

  • a. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICEFROM PRODUCTSEQUENCE BY P_PRICE;

  • b. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICEFROM PRODUCTLIST BY P_PRICE;

  • c. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICEFROM PRODUCTORDER BY P_PRICE;

  • d. SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICEFROM PRODUCTASCENDING BY P_PRICE;

Explanation

Question 34 of 40

1

34. The SQL query to output the contents of the EMPLOYEE table sorted by last name, first name, and initial is ____.

Select one of the following:

  • a. SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE,EMP_PHONEFROM
    EMPLOYEELIST BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;

  • b. SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE,EMP_PHONEFROM
    EMPLOYEEORDER BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;

  • c. SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE,EMP_PHONEFROM
    EMPLOYEEDISPLAY BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;

  • d. SELECT EMP_LNAME, EMP_FNAME, EMP_INITIAL, EMP_AREACODE,EMP_PHONEFROM
    EMPLOYEESEQUENCE BY EMP_LNAME, EMP_FNAME, EMP_INITIAL;

Explanation

Question 35 of 40

1

35. Which query is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another?

Select one of the following:

  • a. SELECT ONLY V_CODEFROM PRODUCT;

  • b. SELECT UNIQUE V_CODEFROM PRODUCT

  • c. SELECT DIFFERENT V_CODEFROM PRODUCT

  • d. SELECT DISTINCT V_CODEFROM PRODUCT;

Explanation

Question 36 of 40

1

36. The SQL aggregate function that gives the number of rows containing non-null values for the given column is ____.

Select one of the following:

  • a. COUNT

  • b. MIN

  • c. MAX

  • d. SUM

Explanation

Question 37 of 40

1

37. The SQL aggregate function that gives the total of all values for a selected attribute in a given column is ____.

Select one of the following:

  • a. COUNT

  • b. MIN

  • c. MAX

  • d. SUM

Explanation

Question 38 of 40

1

38. The SQL aggregate function that gives the average for the specific column is ____.

Select one of the following:

  • a. COUNT

  • b. AVG

  • c. MAX

  • d. SUM

Explanation

Question 39 of 40

1

39. The query 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 values of V_CODE match is ____.

Select one of the following:

  • a. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE <> VENDOR.V_CODE;

  • b. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE = VENDOR.V_CODE;

  • c. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE <= VENDOR.V_CODE;

  • d. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE => VENDOR.V_CODE;

Explanation

Question 40 of 40

1

40. The query 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 values of V_CODE match and the output is ordered by the price is ____.

Select one of the following:

  • a. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE <> VENDOR.V_CODE;ORDER BY P_PRICE;

  • b. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE => VENDOR.V_CODE;ORDER BY P_PRICE;

  • c. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE <= VENDOR.V_CODE;ORDER BY P_PRICE;

  • d. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE,V_PHONEFROM PRODUCT,
    VENDORWHERE PRODUCT.V_CODE = VENDOR.V_CODE;ORDER BY P_PRICE;

Explanation