0% found this document useful (0 votes)
46 views6 pages

CH 7

The document contains questions about SQL commands. The answers are: 1) c. INSERT inserts data into a table one row at a time. 2) b. COMMIT saves work to disk. 3) a. SELECT lists the contents of a table. 4) b. UPDATE enables changes to data. 5) c. SQL-2003 is the current ANSI SQL standard.

Uploaded by

Bree Elaine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
46 views6 pages

CH 7

The document contains questions about SQL commands. The answers are: 1) c. INSERT inserts data into a table one row at a time. 2) b. COMMIT saves work to disk. 3) a. SELECT lists the contents of a table. 4) b. UPDATE enables changes to data. 5) c. SQL-2003 is the current ANSI SQL standard.

Uploaded by

Bree Elaine
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

The SQL command that lets you insert data into a table, one row at a time, is ________.

a. COMMIT
1. b. SELECT
c. INSERT
d. UPDATE

The SQL command that lets you save your work to disk is ________.

a. SELECT
2. b. COMMIT
c. INSERT
d. UPDATE

The SQL command used to list the contents of a table is ________.

a. SELECT
3. b. INSERT
c. COMMIT
d. UPDATE

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

a. INSERT
4. b. UPDATE
c. COMMIT
d. SELECT

The current fully approved version of standard SQL prescribed by the American National Standards
Institute is ________.

5. a. SQL2
b. SQL-4
c. SQL-2003
d. SQL-99

________ is/are SQL character data type(s).

a. ALPHANUMERIC
6. b. CHAR only
c. CHAR & VARCHAR2
d. VARCHAR2 only

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

a. SELECT * FROM PRODUCT;


7. b. DISPLAY * FROM PRODUCT;
c. LIST * FROM PRODUCT;
d. SELECT ALL FROM PRODUCT;

8. In Oracle, the ________ command is used to place a $ in front of a numeric value.

a. DISPLAY
b. CHAR
c. CONVERT
d. FORMAT

Which command would you use when changing the date in the PRODUCT table?

a.

9. b.

c.

d.

Which command is used to restore the table contents?

a. COMMIT; BACKUP;
10. b. COMMIT; RESTORE;
c. ROLLBACK;
d. COMMIT; ROLLBACK;

Which command would be used to delete the table row where the P_CODE = '2238/QPD'?

a.

11. b.

c.

d.

Some RDBMSs (like Oracle) will automatically ________ data changes when issuing data definition
commands.

12. a. ROLLBACK
b. COMMIT
c. UPDATE
d. INVOKE

13. What happens when you issue the DELETE FROM tablename command without specifying a
WHERE condition?

a. the last row will be deleted


b. no rows will be deleted
c. the first row will be deleted
d. all rows will be deleted

Which command is used to select partial table contents?

a.

14. b.

c.

d.

Which query would be used to output the table contents where the value of V_CODE is equal to
21344?

a.

15.
b.

c.

d.

Which query would be used to output the table contents where the value of V_CODE is not equal to
21344?

a.

16.
b.

c.

d.

17. Which query would be used to output the table contents where the value of V_CODE is less than or
equal to 21344?

a.

b.

c.

d.

Which query would be used to output the table contents where the value of the character field
P_CODE is 1558-QW1?

a.

18.
b.

c.

d.

Which MS Access query command will list all the rows in which the inventory stock dates occur on or
after January 20, 2006?

a.

19.
b.

c.

d.

20. Which command uses columns and column aliases to determine the total value of each of the
products held on hand and displays the results in a column labeled TOTVALUE?

a. SELECT P_DESCRIPT, P_QOH, P_PRICE,P_QOH=P_PRICE AS


TOTVALUE
FROM PRODUCT;
SELECT P_DESCRIPT, P_QOH, P_PRICE,P_QOH-P_PRICE AS
TOTVALUE
b. FROM PRODUCT;
SELECT P_DESCRIPT, P_QOH, P_PRICE,P_QOH*P_PRICE AS
TOTVALUE
c. FROM PRODUCT;
SELECT P_DESCRIPT, P_QOH, P_PRICE,P_QOH/P_PRICE AS
TOTVALUE
d. FROM PRODUCT;

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

a. stored function
21. b. data type
c. trigger
d. alias

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

a.

22. b.

c.

d.

The ________ operator is used to check whether an attribute value is null.

a. IN
23. b. BETWEEN
c. IS NULL
d. LIKE

The ________ operator is used to define a range limit.

a. LIKE
24. b. IN
c. BETWEEN
d. NULL

You might also like