-
Change a table name
How do you change a table name, say from APPLES to PEARS ?
Many thanks
-
create table apples(id int)
sp_rename apples,pineapple
-
Cheers MAK for your reply, but I can't get that to work. I've got the table APPLES already setup but I can't change the name of the table.
-
why not? what error message you are getting?
do u have dbo access or db_ddladmin access?
BTW.. r u using sql server 2000?
-
I'm new to this, I'm using Oracle SQL Plus
-
rename table_name2 to table_name1;
-
for Oracle you can rename a table by:
ALTER TABLE table_name2 RENAME TO table_name1;
-
Many thanks! excellent. Can you change a column name in Oracle do you know ?
-
yes,
example:
ALTER TABLE table_name
RENAME COLUMN column_name1 TO column_name2;
-
I'm afraid I can't get this to work in Oracle any ideas ?
Cheers
Rich
-
more than likely version / permissions.
what error are you getting.
what version or oracle are you using.
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
|
|