Cannot alter column in existing table in java Derby database
问题 I am trying to alter my table by changing one of the columns in the table. But, I am encountering an error while I execute the following sql command - ALTER TABLE WALLETUSER MODIFY WALLETUSERNAME VARCHAR NOT NULL; The error i receive is - Error code -1, SQL state 42X01: Syntax error: Encountered "MODIFY" at line 1, column 24. Would appreciate any help. 回答1: Try this instead: ALTER TABLE WALLETUSER ALTER COLUMN WALLETUSERNAME NOT NULL; Full syntax guide: ALTER TABLE table-Name { ADD COLUMN