5. Populating Tables : Formatted Copying : Copy Data into a Formatted File : Data with Variable-Length Fields
 
Share this page                  
Data with Variable-Length Fields
Variable-length data items are written to a file by the COPY statement with the formats:
text(0)
varchar(0)
long varchar(0)
byte varying(0)
long byte(0)
nvarchar(0)
long nvarchar(0)
An ASCII length is written preceding the data (except for text(0), which does not use a length specifier). The length of the data copied corresponds to the number of characters or bytes in the column, not the width of the column specified in the CREATE statement.