Example: Using BYTE to Obtain the Number of Bytes in a Badge Picture

Teradata Vantageā„¢ SQL Functions, Expressions, and Predicates

brand
Software
Teradata Vantage
prodname
Teradata Database
Teradata Vantage NewSQL Engine
vrm_release
16.20
category
Programming Reference
featnum
B035-1145-162K

The following statement applies the BYTES function to the BadgePic column, which is type VARBYTE(32000), to obtain the number of bytes in each badge picture.

   SELECT BadgePic, BYTES(BadgePic) 
   FROM Employee; 

The result is as follows:

   BadgePic        Bytes(BadgePic)
   --------------  ---------------
   20003BA0                      4
   9A3243F805                    5
   EEFF08C3441900                7