TOPIC | TEXT | SYNTAX | Example |
---|---|---|---|
INT Type | Possible values: -2147483648 to 2147483647. | INT | INTEGER | MEDIUMINT | INT4 | SIGNED | |
BOOLEAN Type | Possible values: TRUE and FALSE. | BOOLEAN | BIT | BOOL | |
TINYINT Type | Possible values are: -128 to 127. | TINYINT | |
SMALLINT Type | Possible values: -32768 to 32767. | SMALLINT | INT2 | YEAR | |
BIGINT Type | Possible values: -9223372036854775808 to 9223372036854775807. | BIGINT | INT8 | |
IDENTITY Type | Auto-Increment value. | IDENTITY | |
DECIMAL Type | Data type with fixed precision and scale. | { DECIMAL | NUMBER | DEC | NUMERIC } ( precisionInt [ , scaleInt ] ) | |
DOUBLE Type | Floating point number. | { DOUBLE [ PRECISION ] | FLOAT | FLOAT4 | FLOAT8 } | |
REAL Type | Single precision floating point number. | REAL | |
TIME Type | The format is hh:mm:ss. | TIME | |
DATE Type | The format is yyyy-MM-dd. | DATE | |
TIMESTAMP Type | The format is yyyy-MM-dd hh:mm:ss[. | { TIMESTAMP | DATETIME | SMALLDATETIME } | |
BINARY Type | Represents a byte array. | { BINARY | VARBINARY | LONGVARBINARY | RAW | BYTEA } [ ( precisionInt ) ] | |
OTHER Type | This type allows storing serialized Java objects. | OTHER | |
VARCHAR Type | Unicode String. | { VARCHAR | LONGVARCHAR | VARCHAR2 | NVARCHAR | NVARCHAR2 | VARCHAR_CASESENSITIVE} [ ( precisionInt ) ] | |
VARCHAR_IGNORECASE Type | Same as VARCHAR, but not case sensitive when comparing. | VARCHAR_IGNORECASE [ ( precisionInt ) ] | |
CHAR Type | This type is supported for compatibility with other databases and older applications. | { CHAR | CHARACTER | NCHAR } [ ( precisionInt ) ] | |
BLOB Type | Like BINARY, but intended for very large values such as files or images. | { BLOB | TINYBLOB | MEDIUMBLOB | LONGBLOB | IMAGE | OID } [ ( precisionInt ) ] | |
CLOB Type | CLOB is like VARCHAR, but intended for very large values. | { CLOB | TINYTEXT | TEXT | MEDIUMTEXT | LONGTEXT | NTEXT | NCLOB } [ ( precisionInt ) ] | |
UUID Type | Universally unique identifier. | UUID | |
ARRAY Type | An array of values. | ARRAY |
SQL basics- complete reference guide - part3 - Data Types in SQL
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment
Your Comment and Question will help to make this blog better...