16.20 - 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

Product
Advanced SQL Engine
Teradata Database
Release Number
16.20
Release Date
March 2019
Content Type
Programming Reference
Publication ID
B035-1145-162K
Language
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