Grammar:
Alter Table < table name >altercolumn< field name > new type name (length)
Example: If a named T1, the field name F1, the original F1 is varchar (3), now to varchar (10), then you can write:
Alter Table Alter column varchar (ten)
In general, you can use this statement to change the field name :
Alter Table column to C
However, in practical applications, we tend to compile with j-sql, and J-sql does not support modifying field names, so if you must modify the field name, then only through the workaround, the specific idea is:
1. Create a new field, named C;
2. Copy the contents of field A to C;
3. Delete field A;
syntax for SQL to modify field lengths:
ALTER TABLE name modify field type;
Example code for SQL to modify field lengths
Alter Table VARCHAR2 (4000);
Standard SQL, applicable to any database
Alter Table varchar (a);
Modify Field name Name
ALTER TABLE COLUMN to COL2;
Add Field
Alter Table Add Stationstate CHAR(1)
Turn
SQL Modify Field length