All Products
Search
Document Center

AnalyticDB:ST_NumBands

Last Updated:Mar 28, 2026

Returns the number of bands in a raster object.

Syntax

integer ST_NumBands(raster raster_obj);

Parameters

ParameterTypeDescription
raster_objrasterThe raster object.

Return value

Returns an integer representing the number of bands in the raster object.

Examples

select ST_NumBands(raster_obj) from raster_table;
------------------------------------
3