Using Datatypes

Previous
Previous
Next
Next

A datatype associates a fixed set of properties with values that are used in a column of a table or in an argument of a procedure or function. The properties of datatypes cause Oracle Database XE to treat values of one datatype differently from values of another datatype. For example, Oracle Database XE can use the addition operator on values of numeric datatypes, but not with values of some other datatypes.

The datatypes supported by Oracle Database Express Edition include:

When you create a table, you must specify a datatype for each of its columns to define the nature of the data to be stored in the column. For example, a column defined as a DATE datatype cannot accept the value February 29 (except for a leap year) or the values 2 or SHOE. When specifying a datatype, you can also indicate the longest value that can be placed in the column. In most cases, you only need columns of NUMBER, VARCHAR2, and DATE datatypes to create a definition of a table.

To view the datatypes specified for the columns in a database table, such as the employees table, you can use the Object Browser page. See "Managing Database Objects With Object Browser". You can use also use the DESCRIBE command entered at SQL Command Line (SQL*Plus). For information about the SQL Command Line DESCRIBE command, see "SQL Command Line DESCRIBE Command".

This section contains the following topics:


See Also: