create table bop_attachment_info ( accachment_id bigint(20) not null comment '附件编码', obj_id bigint(20) not null comment '附件所属者id', module varchar(2) not null comment '附件所属模块 1-需求管理 2-能力管理 3-场景管理 4-案例管理', file_name varchar(200) not null comment '文件名称', file_path varchar(400) not null comment '文件路径', crt_time datetime not null default current_timestamp comment '创建时间', primary key (accachment_id), key idx_obj_id (obj_id), key idx_module (module) ) comment '附件表';
时间: 2024-04-14 09:32:12 浏览: 6
语法上看,这是一个创建名为 `bop_attachment_info` 的表的SQL语句。表包含以下列:
- `accachment_id`: bigint类型,长度为20,非空,表示附件编码。
- `obj_id`: bigint类型,长度为20,非空,表示附件所属者id。
- `module`: varchar类型,长度为2,非空,表示附件所属模块。取值范围为1-需求管理、2-能力管理、3-场景管理、4-案例管理。
- `file_name`: varchar类型,长度为200,非空,表示文件名称。
- `file_path`: varchar类型,长度为400,非空,表示文件路径。
- `crt_time`: datetime类型,非空,默认值为当前时间戳,表示创建时间。
表的主键是 `accachment_id`,还有两个索引:`idx_obj_id`(对 `obj_id` 列)和 `idx_module`(对 `module` 列)。
该表用于存储附件信息。
相关问题
ALTER TABLE scrap_apply_detail ADD product_id BIGINT ; 设置为不为null
您可以使用以下SQL语句来满足您的需求:
```
ALTER TABLE scrap_apply_detail
ADD product_id BIGINT NOT NULL;
```
这将向现有的scrap_apply_detail表添加一个名为product_id的BIGINT列,并将其设置为不可为空。
ALTER TABLE `inst_newbie_guide_info` MODIFY COLUMN `playerId` bigint(20) NOT NULL FIRST;
As an AI language model, I can only provide you with the SQL statement and its meaning. This SQL statement modifies the column `playerId` in the table `inst_newbie_guide_info`. It changes the data type of the column to `bigint(20)` and sets the `NOT NULL` constraint which means the column cannot contain NULL values. It also moves the column to the first position in the table.