帮我将这4条sql合并为一条sql ALTER TABLE user_data_version_backup ADD COLUMN org_path varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组织路径'; ALTER TABLE user_data_version_backup ADD COLUMN sex char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)'; ALTER TABLE user_data_version_backup ADD COLUMN portrait_url varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '融云小头像URL'; ALTER TABLE user_data_version_backup ADD COLUMN portrait_big_url varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '融云大图头像url';
时间: 2023-08-23 10:05:12 浏览: 169
alter table 2.zip_ALTER_Table_csharp_sql
你可以使用以下语句将这四条 SQL 合并为一条:
```sql
ALTER TABLE user_data_version_backup
ADD COLUMN org_path varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '组织路径',
ADD COLUMN sex char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '0' COMMENT '用户性别(0男 1女 2未知)',
ADD COLUMN portrait_url varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '融云小头像URL',
ADD COLUMN portrait_big_url varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '融云大图头像url';
```
这样就能一次性添加这四个列到 `user_data_version_backup` 表中。
阅读全文