SQL Data Types

SQL Data Types are the type of data which Oracle SQL is programmed to process.

List of SQL Data Types is given below

SQL Data Types

Syntax of SQL Data Types

Explanation of SQL Data Types

integer integer  SQL Data Type for an integer value.
smallint smallint  SQL Data Type for small integer value.
numeric numeric(p,s) In this SQL Data Type: p is a accuracy value and s is a scale value. As an example, numeric(9,4) will be a number having 5 digits before decimal and 4 digits after decimal like 12345.6789
decimal decimal(p,s) In this SQL Data Type: p is a accuracy value and s is a scale value.
real real Real represents Single-precision floating point number
double precision double precision Double SQL Data Types represent Double-precision floating point number
float float(p) Float SQL Data Type represents p is a precision value.
character char(x) Character SQL Data Types represent the number of characters to store. In Char data type space is padded filling number of characters specified.
character varying varchar2(x) Varchar SQL Data Types tell the number of characters to store. This data type does NOT pad spaces in the value.
bit bit(x) Bit data type tells the number of bits to store.
bit varying bit varying(x) Bit Varying tells the number of bits to store. The maximum length can vary up to x bits.
date date Very important Data Type: It Stores year, month, and day values.
time time Time Data Type stores hour, minute, and second values.
timestamp timestamp Stores year, month, day, hour, minute, and second values.
time with time zone time with time zone This SQL Data Type is same as time, but it also stores an offset from UTC of specified time.
timestamp with time zone timestamp with time zone This SQL Data Type same as timestamp, but it also stores an offset from UTC of specified time.
year-month interval Contains a year value, a month value, or can contain both.
day-time interval Contains a day value, an hour value, a minute value, and/or a second value.

Hope above SQL Data Types table was helpful to you, it it was, then please share the same with others also.

Tagged , , , , . Bookmark the permalink.