SQL Server changing a float to a real

  • Does anyone know why when you run a script to create a table in SQL2000, it automatically changes your datatype from a float(8) to a real(4)?

    Example:

    create table Test( myfloat float(8))

    go

    Then if you run sp_columns test is shows

    Table_qualifier: XXX

    Table_Owner:dbo

    Table_Name:Test

    Column_Name:myfloat

    Data_Type: 7

    Type_Name: real

    Presision:7

    Length:4

    Thank,

    Kat

  • take out the (8)

    drop table test

    go

    create table Test(myfloat float)

    go

    exec sp_columns test returns the float you expected.

    J. Moseley

    [font="Courier New"]ZenDada[/font]

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

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