且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何在Maria DB中重命名列名称

更新时间:2023-11-22 23:10:58

表名,列名等可能需要用反引号引起来,而不需要用撇号(')或双引号(").

Table names, column names, etc, may need quoting with backticks, but not with apostrophes (') or double quotes (").

ALTER TABLE subject
    CHANGE COLUMN `course_number`   -- old name; notice optional backticks
                   course_id        -- new name
                   varchar(255);     -- must include all the datatype info