type
SMALLINT
PostgreSQL uses a signed 16-bit integer; choose it only when the domain fits -32768 through 32767. Example target: PostgreSQL 17. Run in a disposable database; examples need no existing tables.
Formal Syntax & Structure
sql syntaxsql
SMALLINTWorking Example
Example Snippetsql
SELECT CAST(32767 AS SMALLINT);