2009-07-01

Data Types in Oracle

Data types in Oracle:

  1. char(l), is used to store fixed length string where l is the maximum length of the string.
  2. varchar2(l), is used to store variable length string where l is the maxium length of the string. Different of varchar2 and char is that: no matter how long the string store in char, it will reserve space of length defined in char, while varchar2's length can be flexible.
  3. varchar(l), is same as varchar2 but varchar2 have a higher string length capacity.
  4. number(p, s), is used to store either integer or double, where p (precision) is the length of the number and s (scale) is the decimal of the number.
  5. date, is used to store date and time, where the default date time format is dd/mon/yy hh24:mm:ss.
  6. blob is used to store binary object like image, document or audio file. lob is stand for Large Object.
  7. long is used to store string, which has longer capacity than varchar2.
  8. raw is used to store binary object like blob, and actually is obsolete.

0 comments: