SQL Data Type
Advertisements
Data Type in SQL
In SQL Data Type defines a kind of value that a column can contain.
Data type | Syntax | |
---|---|---|
1 | Integer | INTEGER |
2 | Smallint | SMALLINT |
3 | Numeric | NUMERIC(P,S) |
4 | Real | REAL |
5 | Decimal | DECIMAL(P,S) |
6 | Float | FLOAT(P) |
7 | Character | CHAR(X) |
8 | Character varying | VARCHAR2(X) |
9 | Date | Date |
10 | Time | TIME |
Note: Data Type varies from database to database. For example, MySQL supports INT but Oracle supports NUMBER for integer values.
Google Advertisment