table-rename

Rename a table in MySQL

纵饮孤独 提交于 2019-11-28 15:18:32
Renaming a table is not working in MySQL RENAME TABLE group TO member; The error message is #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'group RENAME TO member' at line 1 The query is working fine on other tables for me, but not with the table group . Joachim Isaksson group is a keyword (part of GROUP BY ) in MySQL, you need to surround it with backticks to show MySQL that you want it interpreted as a table name: RENAME TABLE `group` TO `member`; added (see comments)- Those are not single quotes.

Rename Oracle Table or View

荒凉一梦 提交于 2019-11-27 13:25:35
问题 What is the syntax to rename a table or view in Oracle? 回答1: ALTER TABLE mytable RENAME TO othertable In Oracle 10g also: RENAME mytable TO othertable 回答2: To rename a table you can use: RENAME mytable TO othertable; or ALTER TABLE mytable RENAME TO othertable; or, if owned by another schema: ALTER TABLE owner.mytable RENAME TO othertable; Interestingly, ALTER VIEW does not support renaming a view. You can, however: RENAME myview TO otherview; The RENAME command works for tables, views,