批量生成修改oracle/sql server/mysql数据库各个表相同名字列的长度语句
--oracle SELECT ‘alter table ‘ || TABLE_NAME ||‘ modify 列名 VARCHAR2(300);‘ FROM USER_TAB_COLUMNS WHERE COLUMN_NAME = ‘列名‘ and TABLE_NAME; --sql server SELECT ‘alter table ‘ + TABLE_NAME + ‘ alter column 列名 VARCHAR(300);‘ FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_NAME =‘列名‘; --mysql select concat(‘alter table ‘,table_name,‘ modify column 列名 VARCHAR(300);‘) from information_schema.columns WHERE COLUMN_NAME = ‘列名‘;
相关推荐
CoderToy 2020-11-16
emmm00 2020-11-17
bianruifeng 2020-11-16
云中舞步 2020-11-12
世樹 2020-11-11
暗夜之城 2020-11-11
Coder技术文摘 2020-09-29
huacuilaifa 2020-10-29
Gexrior 2020-10-22
tufeiax 2020-09-03
疯狂老司机 2020-09-08
sunnyxuebuhui 2020-09-07
xkorey 2020-09-14
周嘉笙 2020-11-09
zhuzhufxz 2020-09-16
技术之博大精深 2020-10-16
张荣珍 2020-11-12
amienshxq 2020-11-14