BYTE/BYTES Function Example | Teradata Vantage - 17.10 - Example: Using BYTE to Obtain the Number of Bytes in a Badge Picture - Advanced SQL Engine - Teradata Database

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

Advanced SQL Engine
Teradata Database
Release Number
Release Date
July 2021
Content Type
Programming Reference
Publication ID
English (United States)

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