xtype 99

  • Hi everyone

    in SYSCOLUMNS System table what does XTYPE = 99 or xtype = 35 ,

    from books online it is reffering physical storage but i did not really understand.

    please provide light on.

    thanks in advance.

  • I beleive but may be wrong that it represnts the datatype of the column in question.

    35 = Text

    99 = NText

    Gethyn Elliswww.gethynellis.com

  • Seems to be not appropriate.may be i must be wrong.

    do any one give some insight on this .

  • I think Ellis is right:

    select name, system_type_id

    from sys.types

    where system_type_id in (35,99)

    name system_type_id

    -----------------------

    text 35

    ntext 99


    * Noel

  • xtype column in syscolumns refer to the type id of each datatype or user defined datatype. xtype maps to system_type_id column in sys.types table.

    sys.types view contains all information abount datatypes (including user defined data types).

    for example lets create a table

    create table abc(a varchar(100))

    if you query the syscolumns table to get the xtype of the column a,

    select xtype from syscolumns where id=object_id('abc'), you will get 167.

    then query the sys.types table

    select * from sys.types where system_type_id=167, you will see the row corresponds to varchar.


    subban

Viewing 5 posts - 1 through 4 (of 4 total)

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