Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这个查询有什么问题?
ALTER TABLE KARGO ADD COLUMN test VARCHAR(100) NOT NULL DEFAULT t
DEFAULT t位是错误的。
DEFAULT t
您需要引用默认值DEFAULT 't'
DEFAULT 't'
默认值应该被引用,因为该字段是 varchar ,正确的语法:
ALTER TABLE KARGO ADD COLUMN testt VARCHAR (100) NOT NULL DEFAULT 't'