Get a list of the col with a specific data types

  • I know it's a shame, please remind me how

    I can get a list of the columns from specific database where datatype is real(for example).

    I know you guys know everything 🙂

    Thank you!

  • select col.name as ColName, obj.name as TableName, typ.name as DataType

    from syscolumns col, systypes typ, sysobjects obj

    where col.xtype = typ.xtype

    and col.id = obj.id

    and typ.xtype = 59

    and obj.xtype = 'U'

    order by obj.name, col.name

    xtype 59 is datatype real. You can find data type code from systypes table.

    Edited by - Allen_Cui on 03/25/2003 2:01:06 PM

  • Thank you, very much!!!!!!!!!

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

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