sybasesap-asesqldatatypessybase-ase15

What are types finishing with "N" in Sybase ASE?


I'm working with a Sybase ASE 15.7 instance.

After querying the systypes table, I've seen many data types such as floatn, intn, datetimn, moneyn. They have the same length of their counterparts (float, int, datetime, ...) and seem to differ only in its type code and hierarchy. Sybase ASE documentation mention the former (as in here or here) but there is no explanation of their purpose.

What are these data types intended for and what's the difference with their counterparts without the trailing "N"?


Solution

  • If a user designates a column as a fixed-length column AND nullable, ASE will silently convert this datatype to a variable-length/nullable datatype designated as <datatype>n.

    When you run sp_help you should still see the original datatype, but internally ASE will use the <datatype>n type.

    You can read a bit more about this in the ASE documentation on Datatype Conversions