The Database Knowledgebase on the Web

KNOWLEDGEBASE:

SQL

Oracle

MySQL

Postgres 

General topics 

Glossary 

SQL

Data Types

Numeric

The Numeric data type holds numeric data, i.e. numbers. If you are going to add it, subtract it, count it, average it or do any other mathematical operation, it is a number. Most databases support integer and floating point data types.

Integer types may be named INT, INTEGER, SMALLINT, BIGINT, NUMBER or NUMERIC. You may be able to set the precision and scale within parenthesis.

Floating point data types may be called FLOAT, REAL, BINARY FLOAT, DOUBLE, NUMERIC or NUMBER.

Notice that NUMBER and NUMERIC are in both categories. I've seen them both ways.

An example using NUMBER:

Var1 NUMBER;

Var2 NUMBER(7);

Var3 NUMBER(7,2);


NUMBER(7) is the equivalent of NUMBER(7,0). NUMBER(7,2) means a number that is 7 dig

Topic: String Numeric Date Boolean

Topics:

Contact: Lewis Cunningham
lewisc@databasewisdom.com

About us

Contact us

Support us

Search Database Wisdom