Money datatype

  • Hi all,

    Is money datatype equivalent to decimal(13,4)?

    Thanks

  • it's just a bit bigger: (19,4)

    here's an example:

    create table money(

    mymoney money)

    select * from sys.columns where name = 'mymoney'

    select type_name(system_type_id) ,

    type_name(user_type_id),

    '('+ convert(varchar,precision)+ ','+ convert(varchar,scale) + ')'

    from sys.columns where name = 'mymoney'

    --results:

    /*

    (No column name)(No column name)(No column name)

    moneymoney(19,4)

    */

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Money is not really Decimal (19,4). It is actually implemented as an 8 byte number (similar to a BIGINT) and has a max value of 922,337,203,685,477.5807 which is less than the max value for Decimal (19,4).

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply