Grammar:
ALTER TABLE < table name > ALTER column < 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 T1 ALTER COLUMN F1 varchar (10)
In general, you can use this statement to change the field name :
ALTER TABLE A rename column A 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 Qtline modify Qtl_bidernote VARCHAR2 (4000);
Standard SQL, applicable to any database
ALTER TABLE fzrtmis.reporttemplate modify RepName varchar (100);
Modify Field name Name
ALTER TABLE TABLENAME RENAME COLUMN COL1 to COL2;
Add Field
ALTER TABLE FZRTMIS.ITIEMBUILDQK add Stationstate CHAR (1)
"Go" SQL Modify field length