Character type
Char fixed length, Max 2000 characters
char (10) ' xiaoming ', followed by 6 characters will be wasted, suitable for defining fixed-length and frequently queried fields, such as ID number, high efficiency
VARCHAR2 variable length, max 4000 characters
VARCHAR2 (10) ' Xiaoming ' behind 6 character space will be saved
Clob character type large object, Max 4G
Digital type
NUMBER-10 's 38-time-square-38-square
Number (5,2) represents 5 significant digits, with two decimal places -999.99~999.99
Number (5) represents a 5-bit integer
Date type
Date contains the day of the month and seconds
Image
blobs can hold sounds and pictures
Build table
Create TableStudent (--Table nameId Number(4),--School NumberNamevarchar2( -),--nameSexChar(2),--SexBirthday date,--BirthdaySal Number(7,2)--Scholarships)
SELECT from WHERE PARAMETER = ' Nls_characterset '; If Value=al32utf8 a Chinese character takes 3 bytes, you have to set char (3)
Query table structure
DESC student;
Add Field
Alter Table Add (ClassID number (2));
Modify the length of a field
Delete a field
Alter Table Drop column sal;
Modify Table Name
to Stu;
Add data
INSERT into student values (' 01 ', ' Zhang San ', ' Male ', ' November-November-82 ', 10000.98);
Management of Oracle Tables