Я вижу, что представления имеют поле комментариев, как и обычные таблицы, но по умолчанию заполняются значением "VIEW".
[TABLE_CATALOG] =>
[TABLE_SCHEMA] => xxx
[TABLE_NAME] => view__xxxx
[TABLE_TYPE] => VIEW
[ENGINE] =>
[VERSION] =>
[ROW_FORMAT] =>
[TABLE_ROWS] =>
[AVG_ROW_LENGTH] =>
[DATA_LENGTH] =>
[MAX_DATA_LENGTH] =>
[INDEX_LENGTH] =>
[DATA_FREE] =>
[AUTO_INCREMENT] =>
[CREATE_TIME] =>
[UPDATE_TIME] =>
[CHECK_TIME] =>
[TABLE_COLLATION] =>
[CHECKSUM] =>
[CREATE_OPTIONS] =>
[TABLE_COMMENT] => VIEW
Когда я пытаюсь создать представление с комментарием, я получаю сообщение об ошибке.
CREATE OR REPLACE VIEW view__x AS
SELECT
*
FROM `some_table`
COMMENT = 'some comment'
Есть ли способ изменить поле комментария или это поле используется внутри для чего-то еще и должно оставаться таким, как оно есть?
Я добавил запрос функции в mysql.