confused please [message #316890] |
Mon, 28 April 2008 15:25 |
aatishpatel
Messages: 4 Registered: March 2008
|
Junior Member |
|
|
-- An object type has changed its definition. what should you do to a table containing a column with the changed object type?
--Is the command valid or not? why
ALTER TABLE CAR
DROP COLUMMN CAR_OWNER
RENAME COLUMN CAR_MANUFACTURER TO CAR_MANUF;
please reply asap. your help is appreciated
|
|
|
|
Re: confused please [message #316894 is a reply to message #316892] |
Mon, 28 April 2008 16:46 |
S.Rajaram
Messages: 1027 Registered: October 2006 Location: United Kingdom
|
Senior Member |
|
|
I am not sure whether this is a sheer coincidence. You were the first person to reply to all of his previous postings.
To OP :
SQL> create table car (car_owner varchar2(15), car_manufacturer varchar2(15));
Table created.
SQL> ALTER TABLE CAR
2 DROP COLUMMN CAR_OWNER
3 RENAME COLUMN CAR_MANUFACTURER TO CAR_MANUF;
DROP COLUMMN CAR_OWNER
*
ERROR at line 2:
ORA-00905: missing keyword
SQL> ed
Wrote file afiedt.buf
1 ALTER TABLE CAR
2 DROP COLUMMN CAR_OWNER
3* RENAME COLUMN CAR_MANUFACTURER TO CAR_MANUFactuer
SQL> /
DROP COLUMMN CAR_OWNER
*
ERROR at line 2:
ORA-00905: missing keyword
SQL> ed
Wrote file afiedt.buf
1 ALTER TABLE CAR
2 DROP COLUMN CAR_OWNER
3* RENAME COLUMN CAR_MANUFACTURER TO CAR_MANUFactuer
SQL> /
RENAME COLUMN CAR_MANUFACTURER TO CAR_MANUFactuer
*
ERROR at line 3:
ORA-00933: SQL command not properly ended
Regards
Raj
[Updated on: Mon, 28 April 2008 16:50] Report message to a moderator
|
|
|