Re: Rename...
"Tony Andrews" <[email protected]> Wed, 12 Feb 2003 15:33:28
| Newsgroups | gmane.comp.db.oracle.devel |
|---|---|
| Message-ID | <LYRIS-1796914-871303-2003.02.12-15.18.00--gcdod-oracle#[email protected]> |
In Oracle 9.2 you can do this: SQL> ALTER TABLE t RENAME COLUMN x TO y; Before that, you cannot do it as such. You could rename the table and create a view: SQL> RENAME t to tx; SQL> CREATE VIEW t AS SELECT x AS y, a, b, c, ... FROM tx; ... and grant the privileges to match what the table had. Or, if it isn't too big a table: SQL> RENAME t to tx; SQL> CREATE TABLE t SELECT x AS y, a, b, c, ... FROM tx; SQL> DROP TABLE tx; ... and create all the constraints, indexes, triggers, grants, ... --- Change your mail options at http://p2p.wrox.com/manager.asp or to unsubscribe send a blank email to [email protected].