DBMS - Database Management Systems: Q’s And A’s
1.
The SQL command that lets you insert data into a table is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - a. INSERT
2.
The SQL command that lets you save your work to disk is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - c. COMMIT
3.
The SQL command used to list the contents of a table is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - b. SELECT
4.
The SQL command that enables you to make changes in the data is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - d. UPDATE
5.
The current fully approved version of standard SQL prescribed by the
American National Standards Institute is ____.
a. SQL-2003
b. SQL-99
c. SQL-4
d. SQL2 Right Ans - a. SQL-2003
6.
,____ is/are SQL character data type(s).
a. CHAR & VARCHAR2
b. VARCHAR2 only
c. ALPHANUMERIC
d. CHAR only Right Ans - a. CHAR & VARCHAR2
7.
To list all the contents of the PRODUCT table you would use ____.
a. LIST * FROM PRODUCT;
b. SELECT * FROM PRODUCT;
c. DISPLAY * FROM PRODUCT;
d. SELECT ALL FROM PRODUCT; Right Ans - b. SELECT * FROM PRODUCT;
8.
In Oracle, the ____ command is used to place a $ in front of a numeric value.
a. DISPLAY
b. FORMAT
c. CHAR
d. CONVERT Right Ans - b. FORMAT
9.
Which command would you use when changing the date in the PRODUCT
table?
a. CHANGE PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
b. ROLLBACK PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
c. EDIT PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
d. UPDATE PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2'; Right Ans - d. UPDATE PRODUCT
SET P_INDATE = '18-JAN-2008'
, WHERE P_CODE = '13-Q2/P2';
10.
Which command is used to restore the table contents?
a. COMMIT; RESTORE;
b. COMMIT; BACKUP;
c. COMMIT; ROLLBACK;
d. ROLLBACK; Right Ans - d. ROLLBACK;
11.
Which command would be used to delete the table row where the P_CODE =
'BRT-345'?
a. DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
b. REMOVE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
c. ERASE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
d. ROLLBACK FROM PRODUCT
WHERE P_CODE = 'BRT-345'; Right Ans - a. DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
12.
Some RDBMSs (like Oracle) will automatically ____ data changes when issuing
data definition commands.
a. ROLLBACK
b. COMMIT
c. UPDATE
d. INVOKE Right Ans - b. COMMIT
13.
What happens when you issue the DELETE FROM tablename command
without specifying a WHERE condition?
a. no rows will be deleted
1.
The SQL command that lets you insert data into a table is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - a. INSERT
2.
The SQL command that lets you save your work to disk is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - c. COMMIT
3.
The SQL command used to list the contents of a table is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - b. SELECT
4.
The SQL command that enables you to make changes in the data is ____.
a. INSERT
b. SELECT
c. COMMIT
d. UPDATE Right Ans - d. UPDATE
5.
The current fully approved version of standard SQL prescribed by the
American National Standards Institute is ____.
a. SQL-2003
b. SQL-99
c. SQL-4
d. SQL2 Right Ans - a. SQL-2003
6.
,____ is/are SQL character data type(s).
a. CHAR & VARCHAR2
b. VARCHAR2 only
c. ALPHANUMERIC
d. CHAR only Right Ans - a. CHAR & VARCHAR2
7.
To list all the contents of the PRODUCT table you would use ____.
a. LIST * FROM PRODUCT;
b. SELECT * FROM PRODUCT;
c. DISPLAY * FROM PRODUCT;
d. SELECT ALL FROM PRODUCT; Right Ans - b. SELECT * FROM PRODUCT;
8.
In Oracle, the ____ command is used to place a $ in front of a numeric value.
a. DISPLAY
b. FORMAT
c. CHAR
d. CONVERT Right Ans - b. FORMAT
9.
Which command would you use when changing the date in the PRODUCT
table?
a. CHANGE PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
b. ROLLBACK PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
c. EDIT PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2';
d. UPDATE PRODUCT
SET P_INDATE = '18-JAN-2008'
WHERE P_CODE = '13-Q2/P2'; Right Ans - d. UPDATE PRODUCT
SET P_INDATE = '18-JAN-2008'
, WHERE P_CODE = '13-Q2/P2';
10.
Which command is used to restore the table contents?
a. COMMIT; RESTORE;
b. COMMIT; BACKUP;
c. COMMIT; ROLLBACK;
d. ROLLBACK; Right Ans - d. ROLLBACK;
11.
Which command would be used to delete the table row where the P_CODE =
'BRT-345'?
a. DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
b. REMOVE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
c. ERASE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
d. ROLLBACK FROM PRODUCT
WHERE P_CODE = 'BRT-345'; Right Ans - a. DELETE FROM PRODUCT
WHERE P_CODE = 'BRT-345';
12.
Some RDBMSs (like Oracle) will automatically ____ data changes when issuing
data definition commands.
a. ROLLBACK
b. COMMIT
c. UPDATE
d. INVOKE Right Ans - b. COMMIT
13.
What happens when you issue the DELETE FROM tablename command
without specifying a WHERE condition?
a. no rows will be deleted