Prev | Current Page 186 | Next

Rick Greenwald, Robert Stackowiak, Jonathan Stern

"Oracle Essentials: Oracle Database 11g"


Youcan divide Oracle datatype support into three basic varieties: character
datatypes, numeric datatypes, and datatypes that represent other kinds of data. You
can use any of these datatypes when you create columns in a table, as with this SQL
statement:
CREATE SAMPLE_TABLE(
char_field CHAR(10),
varchar_field VARCHAR2(10),
todays_date DATE)
You also use these datatypes when you define variables as part of a PL/SQL procedure.
Datatypes | 83
Character Datatypes
Character datatypes can store any string value, including the string representations of
numeric values. Assigning a value larger than the length specified or allowed for a
character datatype results in a runtime error. You can use string functions, such as
UPPER, LOWER, SUBSTR, and SOUNDEX, on standard (not large) character value
types.
There are several different character datatypes:
CHAR
The CHAR datatype stores character values with a fixed length. A CHAR
datatype can have between 1 and 2,000 characters. If youdon??™t explicitly specify
a length for a CHAR, it assumes the default length of 1.


Pages:
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198
Wczasy nad morzem kasyno kino azjatyckie bwin out of home advertising