If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > Certification Questions!!

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-18-03, 04:54
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
Red face Certification Questions!!

Hi,

Can I please have the best answers for the below questions. No matter how much I read and study somehow they seem to get the better of me!!!

SQL source statements for which two of the following are stored in the system catalog?

A. Views

B. Tables

C. Indexes

D. Triggers

E. Constraints


Given the following transaction in an embedded SQL application:

CREATE TABLE dwaine.mytab (col1 INT, col2 INT)
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK

What is the result of issuing the following statement?

SELECT * FROM dwaine.mytab

A. SQLCODE -204 indicating that "DWAINE.MYTAB" is an undefined name.

B. COL1 COL2
------------ -----------
0 record(s) selected.


C. COL1 COL2
------------ -----------
1 2 1 record(s) selected.


D. COL1 COL2
------------ -----------
1 2
4 3 2 record(s) selected.




Select the best answer.


Given the following statements:

CREATE TABLE t1 (id INTEGER, CONSTRAINT chkid CHECK (id<100))
INSERT INTO t1 VALUES (100)
COMMIT

Which of the following occurs as a result of issuing the statements?

A. The row is inserted with ID having a NULL value.

B. The row is inserted with ID having a value of 100.

C. The row insertion with a value of 100 for ID is rejected.

D. The trigger called chkid is activated to validate the data.


Thanks

Nitin.
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
  #2 (permalink)  
Old 12-18-03, 19:12
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: Certification Questions!!

1) I'd think the answer is Views and Triggers. I'll be tempted to include CONSTRAINTS if it would have been select 3.

2) I think it is SQLCODE -204

3) The row insertion with a value of 100 for ID is rejected.

HTH

Sathyaram

Quote:
Originally posted by nitingm
Hi,

Can I please have the best answers for the below questions. No matter how much I read and study somehow they seem to get the better of me!!!

SQL source statements for which two of the following are stored in the system catalog?

A. Views

B. Tables

C. Indexes

D. Triggers

E. Constraints


Given the following transaction in an embedded SQL application:

CREATE TABLE dwaine.mytab (col1 INT, col2 INT)
INSERT INTO dwaine.mytab VALUES (1,2)
INSERT INTO dwaine.mytab VALUES (4,3)
ROLLBACK

What is the result of issuing the following statement?

SELECT * FROM dwaine.mytab

A. SQLCODE -204 indicating that "DWAINE.MYTAB" is an undefined name.

B. COL1 COL2
------------ -----------
0 record(s) selected.


C. COL1 COL2
------------ -----------
1 2 1 record(s) selected.


D. COL1 COL2
------------ -----------
1 2
4 3 2 record(s) selected.




Select the best answer.


Given the following statements:

CREATE TABLE t1 (id INTEGER, CONSTRAINT chkid CHECK (id<100))
INSERT INTO t1 VALUES (100)
COMMIT

Which of the following occurs as a result of issuing the statements?

A. The row is inserted with ID having a NULL value.

B. The row is inserted with ID having a value of 100.

C. The row insertion with a value of 100 for ID is rejected.

D. The trigger called chkid is activated to validate the data.


Thanks

Nitin.
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On