There are four specifications 1 must start with a letter 2 length cannot exceed 30 characters 3 cannot use ORACLE reserved words 4 can only use the following characters A-Z, a-z, 0-9, $, # and so on. the fixed length of a character CHAR cannot exceed 2000 characters. Example: Put the first four characters of CHAR (10) Xiaohan into Xiaohan, and then add 6 null supplements. VARCHAR2 (20) is a string of up to 4000 characters. Example: VARCHAR2 (10)
There are four specifications 1 must start with a letter 2 length cannot exceed 30 characters 3 cannot use ORACLE reserved words 4 can only use the following characters A-Z, a-z, 0-9, $, # and so on. the fixed length of a character CHAR cannot exceed 2000 characters. Example: Put the first four characters of CHAR (10) Xiaohan into Xiaohan, and then add 6 null supplements. VARCHAR2 (20) is a string of up to 4000 characters. Example: VARCHAR2 (10)
There are four specifications
<1> it must start with a letter.
<2> the length cannot exceed 30 characters
<3> ORACLE reserved words cannot be used.
<4> only A-Z, a-z, 0-9, $, # and so on can be used.
Character Type
The CHAR length cannot exceed 2000 characters.
Example: Put the first four characters of CHAR (10) "Xiaohan" into "Xiaohan", and then add 6 spaces to complete.
VARCHAR2 (20) is a string of up to 4000 characters.
Example: VARCHAR2 (10) 'Han 'oracle is allocated with 4 characters. This saves space.
The maximum size of a CLOB complex object is 4 GB.
In character type, the query speed of char type is the fastest, because it is fixed length and can be matched together for comparison.
Number Type
The value ranges from 10 to 38 to the power of 10.
NUMBER (5, 2) indicates that there are five valid digits, two decimal places. Value Range:-999.99 999.99
NUMBER (5) indicates a five-digit integer. Value Range:-99999 99999
Date type
DATE
TIMESTAMP (TIMESTAMP) ORACLE 9i extension of the DATE data type.
Image
BLOB binary data can store pictures/sounds for 4 GB.
Modify Field Length
Alter table student modify (xm varchar2 (30 ));
Modify the type or name of a field (data is not allowed ).
Alter table student MODIFY (xm CHAR (30 ));
Delete a field.
Alter table student drop column sal;
Modify the table name.
RENAME student TO stu;
Delete table
Drop table student;
Modify the default format of a date
Alter session set nls_date_format = 'yyyy-mm-dd ';
Set save point
SAVEPOINT
Rollback to save the vertex name