简体   繁体   English

2022年大查询alter table add column after a specific column

[英]Big query alter table add column after a specific column in 2022

It's Not Working: ALTER TABLE table_name ADD COLUMN Marketing STRING AFTER COLUMN Detail STRING它不起作用:ALTER TABLE table_name ADD COLUMN Marketing STRING AFTER COLUMN Detail STRING

OUTPUT: Syntax error: Expected end of input but got identifier "AFTER" at [4:82] OUTPUT:语法错误:预期输入结束,但在 [4:82] 获得标识符“AFTER”

AFTER is not supported in creating DDL Statement as per this documentation .根据本文档创建 DDL 语句时不支持AFTER This statement works:该声明有效:

ALTER TABLE `<table_name>` ADD COLUMN Marketing STRING 

Output: Output:

在此处输入图像描述

You can just query the columns next to each other to achieve desired output.您只需查询彼此相邻的列即可实现所需的 output。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM