MySQL修改表名示例
生活随笔
收集整理的這篇文章主要介紹了
MySQL修改表名示例
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
首先,我們新建一個名為test_table的表:
drop table if exists test_table; create table test_table select TABLE_SCHEMA,TABLE_NAME from information_schema.tables where TABLE_SCHEMA='information_schema';然后,我們執行如下語句,將test_table改名為test_table_renamed:
alter table test_table rename to test_table_renamed;接下來我們執行如下語句看當前database下的所有表:
show tables;發現test_table已經改名為test_table_renamed了。
轉載于:https://www.cnblogs.com/zifeiy/p/10215714.html
總結
以上是生活随笔為你收集整理的MySQL修改表名示例的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: A4双面打印多少钱一张
- 下一篇: 用友 SQL笔试题