ALTER TABLE `cms_category` ADD COLUMN `category_is_search` varchar(50) NULL DEFAULT 'enable' COMMENT '栏目是否被搜索' AFTER `category_display`;
时间: 2024-01-27 12:05:16 浏览: 79
好的,你想要在 `cms_category` 表中添加一个名为 `category_is_search` 的列,类型为 `varchar(50)`,允许为空,并且默认值为 'enable',用于表示栏目是否可以被搜索。你希望将该列放置在 `category_display` 列之后。请确认以上信息是否正确。
相关问题
alter table im_group add column is_permit_out VARCHAR(1) DEFAULT 'Y' NOT NULL; COMMENT ON COLUMN im_group.is_permit_out IS 'Y-允许退群,N不允许退群'; alter table im_group_his add column is_permit_out VARCHAR(1) DEFAULT 'Y' NOT NULL; COMMENT ON COLUMN im_group_his.is_permit_out IS 'Y-允许退群,N不允许退群'; alter table pr_order_archives add column init_party_type varchar(3) default 'nil'::character varying; alter table pr_order_archives add column init_party_id numeric(9) default '-1'::integer; alter table pr_order_archives add column init_party_name varchar(256) default 'nil'::character varying; alter table pr_order_archives add column init_org_id numeric(9) default '-1'::integer; alter table pr_order_archives add column init_org_name varchar(256) default 'nil'::character varying; COMMENT ON COLUMN pr_order_archives.init_party_type IS '初始派发处理人类型'; COMMENT ON COLUMN pr_order_archives.init_party_id IS '初始派发处理人ID'; COMMENT ON COLUMN pr_order_archives.init_party_name IS '初始派发处理人名称'; COMMENT ON COLUMN pr_order_archives.init_org_id IS '初始派发处理人组织ID'; COMMENT ON COLUMN pr_order_archives.init_org_name IS '初始派发处理人组织名称';改成oracle的语法
ALTER TABLE im_group ADD is_permit_out VARCHAR2(1) DEFAULT 'Y' NOT NULL;
COMMENT ON COLUMN im_group.is_permit_out IS 'Y-允许退群,N不允许退群';
ALTER TABLE im_group_his ADD is_permit_out VARCHAR2(1) DEFAULT 'Y' NOT NULL;
COMMENT ON COLUMN im_group_his.is_permit_out IS 'Y-允许退群,N不允许退群';
ALTER TABLE pr_order_archives ADD init_party_type VARCHAR2(3) DEFAULT 'nil' NOT NULL;
ALTER TABLE pr_order_archives ADD init_party_id NUMBER(9) DEFAULT -1 NOT NULL;
ALTER TABLE pr_order_archives ADD init_party_name VARCHAR2(256) DEFAULT 'nil' NOT NULL;
ALTER TABLE pr_order_archives ADD init_org_id NUMBER(9) DEFAULT -1 NOT NULL;
ALTER TABLE pr_order_archives ADD init_org_name VARCHAR2(256) DEFAULT 'nil' NOT NULL;
COMMENT ON COLUMN pr_order_archives.init_party_type IS '初始派发处理人类型';
COMMENT ON COLUMN pr_order_archives.init_party_id IS '初始派发处理人ID';
COMMENT ON COLUMN pr_order_archives.init_party_name IS '初始派发处理人名称';
COMMENT ON COLUMN pr_order_archives.init_org_id IS '初始派发处理人组织ID';
COMMENT ON COLUMN pr_order_archives.init_org_name IS '初始派发处理人组织名称';
帮我将这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';
你可以使用以下语句将这四条 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` 表中。
阅读全文