9 lines
343 B
SQL
9 lines
343 B
SQL
alter table `tb_data_resource` ADD COLUMN `total` int NULL comment '整体评分';
|
|
|
|
update tb_data_resource,
|
|
tb_data_resource_assignmark
|
|
SET tb_data_resource.total = round(tb_data_resource_assignmark.total)
|
|
WHERE
|
|
tb_data_resource.id = tb_data_resource_assignmark.id;
|
|
|
|
alter table `tb_data_resource`ADD INDEX `total`(`total` DESC) USING BTREE; |