You can rename an existing table in any schema except the schema SYS. To rename a table you must be either DB owner or Table owner.
Use RENAME TABLE to rename a table.
Syntax: RENAME TABLE table-Name TO new-Table-Name
Ex:- RENAME TABLE EMPLOYEE TO EMPLOYEE_ACT
If you have a view or foreign key that references the table, attempts to rename it will generate an error. Also if there are any check constraints or triggers on the table, attempts to rename it will also generate an error.
RENAME Column: Use the RENAME COLUMN to rename a column in a table.
Ex:- RENAME TABLE EMPLOYEE TO EMPLOYEE_ACT
If you have a view or foreign key that references the table, attempts to rename it will generate an error. Also if there are any check constraints or triggers on the table, attempts to rename it will also generate an error.
RENAME Column: Use the RENAME COLUMN to rename a column in a table.
ex: RENAME COLUMN EMPLOYEE.Employee_ID TO EMP_ID;
You can use ALTER TABLE and RENAME COLUMN to modify Column data type
You can use ALTER TABLE and RENAME COLUMN to modify Column data type
ALTER TABLE EMPLOYEE ADD COLUMN EMP_ID NEWTYPE
UPDATE EMPLOYEE SET EMP_ID = Employee_ID
ALTER TABLE EMPLOYEE DROP COLUMN Employee_ID
RENAME COLUMN t. Employee_ID TO EMP_ID
If a view, trigger, check constraint, foreign key constraint then attempt to rename it will generate an error. Also RENAME COLUMN is not allowed if you have any open cursors that reference the column that is being altered.
If there is an index defined on the column then you can still rename. The index will update automatically to refer by its new name
RENAME Index: Use the RENAME Index to rename an index, you cannot rename indexes in SYS schema
Ex:- RENAME INDEX EMPLOYEE_ID_INDEX TO EMP_ID_INDEX
In case if there are any open cursors that reference the index being renamed then RENAME INDEX is not allowed .
Thanks
UPDATE EMPLOYEE SET EMP_ID = Employee_ID
ALTER TABLE EMPLOYEE DROP COLUMN Employee_ID
RENAME COLUMN t. Employee_ID TO EMP_ID
If a view, trigger, check constraint, foreign key constraint then attempt to rename it will generate an error. Also RENAME COLUMN is not allowed if you have any open cursors that reference the column that is being altered.
If there is an index defined on the column then you can still rename. The index will update automatically to refer by its new name
RENAME Index: Use the RENAME Index to rename an index, you cannot rename indexes in SYS schema
Ex:- RENAME INDEX EMPLOYEE_ID_INDEX TO EMP_ID_INDEX
In case if there are any open cursors that reference the index being renamed then RENAME INDEX is not allowed .
Thanks
Satishbabu G, Oracle ACE
اقوى الخدمات الخاصة بأعمال نقل العفش مع الفك والتركيب في الرياض يقدمها موقع خدماتي الذي يضم افضل شركة نقل عفش بالرياض التي تقدم خدماتها بمنتهى الاحترافية والدقة معتمدين على فريق عمل مدرب جيدا ونجارين متخصصين لتقديم خدمات شركات نقل الاثاث بالرياض باحترافية عالية وجودة غير مسبوقة
ReplyDeletePackers and Movers Ahmedabad - We Provide ***Best Service Providers, Safe, Reliable, Affordable, Trusted ###Movers and Packers in Ahmedabad List, Household Shifting, Office Relocation: Choose Top Verified Packers and Movers Ahmedabad Compare ???Shifting Service Chrages, Price Quotation, Rate List Charts and Save Money and Time @ Packers and Movers Ahmedabad
ReplyDeleteCognex is the AWS Training in Chennai. Cognex is the best training insitute in chennai providing online and offline courses. AWS is the best selection to grow cloud skills
ReplyDeletePackers and Movers Chennai Give Safe and Reliable ***Household Shifting Services in Chennai with Reasonable ###Packers and Movers Price Quotation. We Provide Household Shifting, Office Relocation, ✔✔✔ Local and Domestic Transportation Services, Affordable and Reliable Shifting Service Charges @ Packers And Movers Chennai
ReplyDeleteRe-housing packers and movers company in Dwarka have also specialized in household goods shifting, car relocation, bike relocation and company relocation of all kinds.
ReplyDeletePackers and movers in Sector 14
Packers and movers in Sector 15
Packers and movers in Sector 16
Packers and movers in Sector 19
Packers and movers in Sector 21
Packers and movers in Sector 39
Packers and movers in Sector 86
Packers and movers in Sector 88
Packers and movers in Sector 42
Packers and movers in Sector 80
From individual storage boxes to storage rooms for an entire household articles in Delhi.
ReplyDeletePackers and movers in Rohini Sector 3
Packers and movers in Rohini Sector 6
Packers and movers in Rohini Sector 16
Packers and movers in Rohini Sector 24
Packers and movers in Rohini Sector 20
Packers and movers in East Delhi
Packers and movers in West Delhi
Packers and movers in North Delhi
Packers and movers in New Delhi
Packers and movers in Aya Nagar
One of the best wines which I have every seen before we will be getting any type of bottles here too old alcohol even I'm seeing this Bagga Wines Since 20 years.At the same place in Koti Hyderabad
ReplyDeleteNita Wines in Churchgate, Mumbai
Privacy Policy
Star Wines in Powai, Mumbai
Disclaimer
G Town Wines L1
Variety Wines Merchant in Juhu, Mumbai
Bagga Wines in Putlibowli Koti
Nice post.
ReplyDeletepackers and movers in kondapur
The properties in Kharkhoda industrial area are perfectly suited for emporiums, exhibitions, factories, agriculture, and warehouses, among other things.
ReplyDeletereal estate kharkhoda sonipat hr