Both SMALLINT and INTEGER data types are used to store whole numbers, but SMALLINT is a 2-byte data type that can store values from -32768 to 32767, while INTEGER is a 4-byte data type that can store values from -2147483648 to 2147483647.