-- creating a virtual column
ALTER TABLE membership_registration
ADD COLUMN buyer_name VARCHAR(150) GENERATED ALWAYS
AS (concat(buyer_last_name,', ',buyer_first_name))
COMMENT 'virtual column of buyer name' AFTER buyer_name_old;
以上查询在本地主机上运行良好,但在生产环境和我的sql工作台上未执行相同的查询。