jacklife 2020-06-08
--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 = ‘列名‘;