mysql--验证字段是否更新

2020-03-01  本文已影响0人  w_dll

批处理后,要验证批处理对字段的更改是否更改成功,
查询字段命令如下:

SELECT column_name,DATA_TYPE,CHARACTER_MAXIMUM_LENGTH 
FROM information_schema.columns 
WHERE table_name='你要查询的表名'
AND column_name='你要查询的字段名'

查询dfs_gantry_travelimage和dfs_gantry_transaction的表更新字段数量是否符合预期

SELECT TABLE_NAME,count(1)
FROM information_schema.COLUMNS
WHERE
TABLE_SCHEMA='etcmj' and TABLE_NAME='dfs_gantry_travelimage'
union all 
select TABLE_NAME,count(1) 
from information_schema.COLUMNS
where TABLE_SCHEMA='etcmj' and TABLE_NAME='dfs_gantry_transaction';
上一篇 下一篇

猜你喜欢

热点阅读