IBM DB2 9 Fundamentals certification (Exam 730): Sample question No. 6

Answer a sample question about SQL statements from the IBM DB2 9 Fundamentals certification exam (Exam 730) to prepare you for the test.

The following question is taken from DB2 9 Fundamentals Certification Study Guide, by Roger E. Sanders (copyright...

2007) and is reprinted here with permission from MC Press.

Test your knowledge of DB2 9 by answering the question below, which is from a real, previous DB2 9 Fundamentals exam (exam 730). When you are finished, check your answer and read an explanation using the answer key.

 

IBM DB2 9 Fundamentals certification exam study guide

 

Given the following table:

TEMP_DATA            TEMP DATE

_____________________________

45                                12/25/2006

51                                12/26/2006

67                                12/27/2006

72                                12/28/2006

34                                12/29/2006

42                                12/30/2006

And the following SQL statement:

TE FUNCTION degf_to_c (temp INTEGER)

RETURNS INTEGER

LANGUAGE SQL

CONTAINS SQL

NO EXTERNAL ACTION

DETERMINISTIC

BEGIN ATOMIC

DECLARE newtemp INTEGER;

SET newtemp = temp - 32;

SET newtemp = newtemp * 5;

RETURN newtemp / 9;

END

Which two of the following SQL statements illustrate the proper way to invoke the calar function DEGF_TO_C?

 

A. VALUES degf_to_c(32)

 

B. SELECT date, degf_to_c(temp) AS temp_c FROM temp_data

 

C. CALL degf_to_c(32)

 

D. SELECT * FROM TABLE( degf_to_c(temp)) AS temp_c

 

•           Read the answer and explanation

•           Go back to the list of sample exam questions

This was last published in September 2007

Dig Deeper on Data management jobs, training and certification

PRO+

Content

Find more PRO+ content and other member only offers, here.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

-ADS BY GOOGLE

SearchBusinessAnalytics

SearchAWS

SearchContentManagement

SearchOracle

SearchSAP

SearchSQLServer

Close