Monday, 21 September 2015



Data types in Oracle Data Base


A Data Type represents the which type of Data stores in memory.

1: Numeric Data types:This Data type is allows to enter numeric values such as integer or decimal value.
This Data type is further divided into type

1: Number (size):This data type allows us to enter integer values i.e. +ve or –ve. Suppose if we need to enter the Employee id or student serial no the then we use this type of data type.

2: Number (p,s): This Data type allows us to enter decimal values like average marks, Employee Salary then we use this datatype. Here P represents the precession and S represents scale.

2: Alphabets: This Data type allows us to enter character values, such as Employee name, Student name etc.
1: Char(size)
2: varchar(size)
3: Varchar2(size)

1: Char(size) This Data type is allows us to enter character values such as Student name, employee name etc. the maximum size of this data type is 1 to 2000 character and it always allocate the memory in static fashion.

Student_name char(20);

2/3: varchar(size) /Varchar2(size): These two data type also allows us to enter character values and the maximumsize of the these data type is 1 to 4000 character and it always allocated the memory in dynamic fashion.

Note: The difference between the varchar and Varchar2 data type is varchar data type is developed by along with SQL whereas varchar2 data type is developed by Oracle Corporation.

Date: This data type is allowes us to enter date values in database such as employee joining date. And the default formate of date in SQL is DD-MM-YY The range of date formate in oracle data base is 1- JAN-4712BC to 31-DEC-9999 AD

Timestamp: This data type allowes us to enter both date and time the default formate of timestamp is DD-MM-YY HH:MM:SS

No comments:

Post a Comment