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 > Has DB2 NUMERIC data type?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-28-04, 09:11
hiolgc hiolgc is offline
Registered User
 
Join Date: Mar 2004
Posts: 61
Has DB2 NUMERIC data type?

Hi every one,

A DB2 mock question:

Given that table T1 needs to hold specific numeric values up to 99999.99 in column C1.
Which of the following would be the most exact definition for C1?

1. REAL
2. INTEGER
3. NUMERIC(7,2)
4. DECIMAL(5,2)

What's your answer?

Thanks,
Reply With Quote
  #2 (permalink)  
Old 04-28-04, 09:35
hiolgc hiolgc is offline
Registered User
 
Join Date: Mar 2004
Posts: 61
Yes, there is NUMERIC. When a column is created with NUMRIC data type, it is changed to DECIMAL.
Reply With Quote
  #3 (permalink)  
Old 04-28-04, 10:07
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by hiolgc
Hi every one,

A DB2 mock question:

Given that table T1 needs to hold specific numeric values up to 99999.99 in column C1.
Which of the following would be the most exact definition for C1?

1. REAL
2. INTEGER
3. NUMERIC(7,2)
4. DECIMAL(5,2)

What's your answer?

Thanks,
Is this from a test or something?

3.

REAL rounds, INTEGER can't store decimals, and your (5,2) definition would only store up to 999.99
__________________
--
Jonathan Petruk
DB2 Database Consultant
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