|
-
Hello,
How I can rename the column of emp table having column name sal to salary ??
Is this possible ? and If possible wat are the side effects like re-create indexes ,triggers ,constraints ,compile procedures and functions etc......
Sunil
-
Well you can use alias instead of renaming them if alias is enough for your needs.
-
Hi , Pando ,
Can you explain little bit detail about creating alias
on the column (because I only know alias can be created
on the objects like table ) .
thanks
ligang
-
Pando,
I want to just rename the column name from "sal" to "salary" for all purpose . Alias may help at the time of select statement.
Sunil
-
just do
select sal "Salary" from emp
-
Only if you know what are you doing:
Works on 8.*.* and up (UNLEASHED)
e.s your table is xxx with 2 fields x and y
as sys user:
1. select obj# from obj$
where name='XXX'
- take the number id (es 1000)
2. select obj#, col#, name from col$
where obj#=1000;
OBJ# COL# NAME
1000 1 X
1000 2 Y
3. update col$ set name='THE_NAME_YOU_WANT'
where obj#=1000
and col#=1;
4. run svrmgrl @$ORACLE_HOME/rdbms/admin/catalog
@$ORACLE_HOME/rdbms/admin/catproc
then desc xxx
-
aracnid
Wil that work for droping a column in 8.0.*
Gary Mazzone
-
NO !!, ON "DELETE COLUMN" WILL NOT WORK, AND WILL DAMAGE YOUR TABLE
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|