Formats can be specified for columns that have character, numeric, byte, DateTime, Period, or UDT data types.
FORMAT pertains to data exported in report form, as is the case in BTEQ. FORMAT does not control internal storage representation of data or data returned in record or indicator variable mode.
Use the FORMAT phrase in a CREATE TABLE statement or ALTER TABLE statement to define the display format for a column. You can also use it in a retrieval statement to override the default format of a column or to define the display format of an expression. As such, it is both a Data Definition Language phrase and a Data Manipulation Language phrase.
A FORMAT specification can contain a maximum of 30 characters.
A FORMAT phrase can describe up to 18 digit positions (17 if the FORMAT contains an E). IEEE 64-bit floating numbers are accurate to about 15 digits.
The output string that is produced as a result of a FORMAT phrase can have a maximum of 255 characters.
If you specify a FORMAT phrase to define the format for UDT columns, the format must be valid for the external type of the UDT, as specified by the transform that defines how to pass the UDT between the application and the server.