统一修改数据库表名字段大小写
select table_name from information_schema.tables where table_schema='lcxtest' and table_type='base table'

alter table user_role rename USER_ROLE;

alter table test rename test1; --修改表名alter table test add column name varchar(10); --添加表列alter table test drop column name; --删除表列alter table test modify address char(10) --修改表列类型 ||alter table test change address address char(40)alter table test change column address address1 varchar(30)--修改表列名
SELECTCOLUMN_NAME,COLUMN_TYPE FROMinformation_schema.COLUMNS WHEREtable_schema = 'lcxtest' AND table_name = 'USER_ROLE'

转载于:https://www.cnblogs.com/LcxSummer/p/9463117.html
本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!
