Files
FullAutoWaterCheck/db/rollback_scandata_add_new_fields.sql
2026-02-04 20:05:55 +08:00

32 lines
705 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 回滚scandata表新增字段刻字号、数量、压差设置、标准误差
-- 执行日期2026-02-04
USE fullautowaterpressure;
-- 删除刻字号字段
ALTER TABLE scandata
DROP COLUMN IF EXISTS EngravingNumber;
-- 删除数量字段
ALTER TABLE scandata
DROP COLUMN IF EXISTS Quantity;
-- 删除压差设置字段
ALTER TABLE scandata
DROP COLUMN IF EXISTS PressureDifference;
-- 删除标准误差字段
ALTER TABLE scandata
DROP COLUMN IF EXISTS StandardError;
-- 验证字段是否删除成功
SELECT
COLUMN_NAME,
DATA_TYPE,
COLUMN_COMMENT
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_SCHEMA = 'fullautowaterpressure'
AND TABLE_NAME = 'scandata';