> For the complete documentation index, see [llms.txt](https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://vikram-bajaj.gitbook.io/cs-gy-6083-principles-of-database-systems/sql/domain-types-in-sql.md).

# Domain Types in SQL

SQL has the following domain types:

* **char(n)**: Fixed length character string, with user-specified length n
* **varchar(n)**: Variable length character strings, with user-specified maximum length n
* **int**: Integer
* **smallint**: Small integer
* **numeric(p,d)**: Fixed point number, with user-specified precision of p digits, with d digits to the right of decimal point
* **real, double precision**: Floating point and double-precision floating point numbers, with machine-dependent precision
* **float(n)**: Floating point number, with user-specified precision of at least n digits
* More domains such as time and date are covered later
