Database Reference
In-Depth Information
NUMBER
DATE
BOOLEAN
LONG Specifies the maximum number of characters that can be included in a value. The
number of characters stored is exactly the same number as the value entered, so no spaces
are added to the value. For example, if we define the number of characters as 25, but the
value contains only 15 characters, the remaining ten characters space can be saved. The
data type can be abbreviated VARCHAR2.Example: STUDENT_NAME VARCHAR2(40)
Only integers are accepted. Any parameters with this data type are not specified. It is ab-
breviated as INT.Example: PRODUCT_ID INT
It is used to store numbers( fixed or floating). It specifies the precision and the scale of
a numeric value. Only the precision can be specified. Numbers of any magnitude may be
stored up to 38 digits of precision. If precision is omitted values are stored upto maximum
of 38 digits. Example: COST NUMBER(7,2)
This data type is used to represent date and time. It specifies the year, month, and day
value of a date. Date format to represented as DDMON-YY as in 27-MAY-99. Some time
the year is four digits and supports the values 0001 through 9999; the month is two di-
gits and supports the values 01 through 12; and the day is two digits and supports the val-
ues 01 through 31. Time specifies the hour, minute, and second values of a time.Example:
DATE_OF_BIRTH DATE
The Boolean data type is very simple and easy to apply. The data type holds only three val-
ues: true, false, or unknown. A null value valuates to unknown. In Boolean comparisons,
true is greater than false and a comparison involving an unknown (null) value will return
an unknown result.Example: ALLOWED BOOLEAN
This data type is used to store variable length character strings up to 2GB.
Example : Create a table student with following structure:
Column Name
RollNo
Name
DOB
Address
City
Phone
Search WWH ::




Custom Search