如果修改表名? alter table old_table_name rename to new_table_name;
解决方案 »
- 大侠救命:emagent.exe运行句柄飙升
- 两个问题:1 登入,2 冒出来的表
- Oracle在使用sys/change_on_install登录到sqlplus,浏览器em中登录不进去()
- 关于ORACLE全连接
- 关于SYSTEM用户不能查看其他用户创建的表的问题!急~~~~~~
- 关于ORACLE系统运行的操作系统选型问题(WINDOWS OR LINUX)
- 字符串合并用什么函数
- 很着急:关于bfile类型的问题,帮忙给看看代码!为什么结果是目录或文件不存在
- oracle8i存储过程中如何实现truncate table??
- oracle APEX 中item 设置为popup LOV类型,如何实现从表中获取可选的VALUE值并可编辑添加新的值
- 请教:oracle 9i在哪里下载呢??
- 一定要装oracle客户端程序吗?
ORA-01735: 非法的ALTER TABLE选项
Purpose To rename a table, view, sequence, or private synonym.
Prerequisites The object must be in your own schema. If you are using Trusted Oracle7 in DBMS MAC mode, your DBMS label must match the object's creation label or you must satisfy one of the following criteria: · If the object's creation label is higher than your DBMS label, you must have READUP and WRITEUP system privileges · If the object's creation label is lower than your DBMS label, you must have WRITEDOWN system privilege. · If the object's creation label and your DBMS label are not comparable, you must have READUP, WRITEUP, and WRITEDOWN system privileges.
SyntaxKeywords and Parameters old is the current name of an existing table, view, sequence, or private synonym. new is the new name to be given to the existing object. Usage NotesThis command changes the name of a table, view, sequence, or private synonym for a table, view, or sequence. The new name must not already be used by another schema object in the same namespace and must follow the rules for naming schema objects defined in the section "Object Naming Rules" on page 2 - 3. Integrity constraints, indexes, and grants on the old object are automatically transferred to the new object. Oracle7 invalidates all objects that depend on the renamed object, such as views, synonyms, and stored procedures and functions that refer to a renamed table. You cannot use this command to rename public synonyms. To rename a public synonym, you must first drop it with the DROP SYNONYM command and then create another public synonym with the new name using the CREATE SYNONYM command. You cannot use this command to rename columns. You can rename a column using the CREATE TABLE command with the AS clause. This example recreates the table STATIC, renaming a column from OLDNAME to NEWNAME: CREATE TABLE temporary (newname, col2, col3)
AS SELECT oldname, col2, col3 FROM static
DROP TABLE static
RENAME temporary TO static
Example To change the name of table DEPT to EMP_DEPT: RENAME dept TO emp_dept
Related Topics CREATE SEQUENCE command on 4 - 224 CREATE SYNONYM command on 4 - 241 CREATE TABLE command on 4 - 245 CREATE VIEW command on 4 - 271