Answers
比方说老的数据库名为: OLDDB, 新的数据库名为: NEWDB
你可以使用如下sql语句来实现重命名
alter database OLD_DB rename to NEW_DB;
其他一些数据库相关的语句如下:
ALTER DATABASE name [ [ WITH ] option [ ... ] ]
where option can be:
CONNECTION LIMIT connlimit
ALTER DATABASE name RENAME TO new_name
ALTER DATABASE name OWNER TO new_owner
ALTER DATABASE name SET TABLESPACE new_tablespace
ALTER DATABASE name SET configurationparameter { TO | = } { value | DEFAULT } ALTER DATABASE name SET configurationparameter FROM CURRENT ALTER DATABASE name RESET configuration_parameter ALTER DATABASE name RESET ALL
黄泉yomi
answered 10 years, 7 months ago