Domain Types in SQL
Next: Null Values
Up: Domain Constraints
Previous: Domain Types
-
SQL standard supports a restricted set of domain types:
- Fixed length character string, user-specified length.
- Fixed point number, user-specified precision.
- Integer, machine dependent precision.
- Small integer, machine dependent subset of integer type.
- Floating point, user-specified precision.
- Floating point and double precision floating point with
machine dependent precision.
-
Some SQL implementations include date type.
This allows operations on dates, e.g.
.
-
Comparisons between compatible domains are usually allowed.
To compare an integer and a small integer, the small integer is cast
as an integer.
This is known as type coercion.
Page created and maintained by Osmar R. Zaï ane
Last Update:
Mon Oct 16 17:01:17 PDT 1995