OS:linux ubuntu
最近在对MySQL数据库开发的过程中,需要修改一个view的名字,但是找了许久才找到对应的SQL,切记不是alter,而是rename table ....
在MySQL中,如果想要rename 视图的名字,需要使用rename table 语句。SQL语句例如:
create table test (c1 int primary key, c2 varchar(50)) engine = xxxxx;create view test3 as select * from test;rename table test3 to new_view;