Dataype equivalent

  • Hi all,

    I have to create a new field in a table, the length of the values will be 1.0.

    I just used number(1.0) in oracle. Not sure what I can use in T sql.

    I tried int(1.0) and smallint (1.0). It didnt work.

    Thanks very much for your suggestions

  • You can use datatype 'numeric'

    create table #Tmp (

    Id [numeric](1, 0))

    drop table #Tmp

    By the way, this precision will not allow you to store any decimal part in the field.

    [numeric](2, 1) will allow you to store maximum 1 digit decimal part and 1 digit integer part. Same is true with NUMBER(2, 1) in Oracle.

    -----------------------------------------------------------[font=Arial Black]Time Is Money[/font][font=Arial Narrow]Calculating the Number of Business Hours Passed since a Point of Time[/url][/font][font=Arial Narrow]Calculating the Number of Business Hours Passed Between Two Points of Time[/font]

  • Thanks again!

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

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