0% found this document useful (0 votes)
68 views2 pages

Types of Data Available in The World

The document summarizes the different types of data that can be stored in SQL databases. It lists common data types like character, numeric, date, time, and binary, and provides brief descriptions of each type including examples. Data types determine how data is stored and interacted with in database tables. Choosing the appropriate type for each column is important when designing database schemas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
68 views2 pages

Types of Data Available in The World

The document summarizes the different types of data that can be stored in SQL databases. It lists common data types like character, numeric, date, time, and binary, and provides brief descriptions of each type including examples. Data types determine how data is stored and interacted with in database tables. Choosing the appropriate type for each column is important when designing database schemas.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Institute of Information Technology

Jahangirnagar University

Assignment on
Types of Data Available In the World

Submitted To:
M. Mesbahuddin Sarker
Associate Professor

Submitted By:
Md. Anwar Hossain
ID: 16230
Postgraduate Diploma in Information Technology (PGDIT)

Database Management System


Course Code: PGD 104
Date of Submission: 14/08/2016
Data Types:-
Each column in a database table is required to have a name and a data type.

SQL developers have to decide what types of data will be stored inside each and every table
column when creating a SQL table. The data type is a label and a guideline for SQL to
understand what type of data is expected inside of each column, and it also identifies how SQL
will interact with the stored data.

The following table lists the general data types in SQL:

Data type Description


CHARACTER(n) Character string. Fixed-length n
VARCHAR(n) or Character string. Variable length. Maximum length n
CHARACTER
VARYING(n)
BINARY(n) Binary string. Fixed-length n
BOOLEAN Stores TRUE or FALSE values
VARBINARY(n) or Binary string. Variable length. Maximum length n
BINARY
VARYING(n)
INTEGER(p) Integer numerical (no decimal). Precision p
SMALLINT Integer numerical (no decimal). Precision 5
INTEGER Integer numerical (no decimal). Precision 10
BIGINT Integer numerical (no decimal). Precision 19
DECIMAL(p,s) Exact numerical, precision p, scale s. Example: decimal(5,2) is a
number that has 3 digits before the decimal and 2 digits after the
decimal
NUMERIC(p,s) Exact numerical, precision p, scale s. (Same as DECIMAL)
FLOAT(p) Approximate numerical, mantissa precision p. A floating number in
base 10 exponential notation. The size argument for this type consists of
a single number specifying the minimum precision
REAL Approximate numerical, mantissa precision 7
FLOAT Approximate numerical, mantissa precision 16
DOUBLE Approximate numerical, mantissa precision 16
PRECISION
DATE Stores year, month, and day values
TIME Stores hour, minute, and second values
TIMESTAMP Stores year, month, day, hour, minute, and second values
INTERVAL Composed of a number of integer fields, representing a period of time,
depending on the type of interval
ARRAY A set-length and ordered collection of elements
MULTISET A variable-length and unordered collection of elements
XML Stores XML data

You might also like