Home > DeveloperSection > Forums > SQL - Delete a column from a table without changing the environment
Goti Bandu

Total Post:119

Posted on    May-02-2013 3:09 AM

 MSSQL Server MSSQL Server 

 1 Reply(s)
 982  View(s)
Rate this:
Hi Everyone!

I'm working in a Oracle SQL database, quite big database. One of (among 150 tables) this table has to be changed because it's redundant (it can be generated through a join). I'm asked to delete a column from this table, to get rid of the redundancy. The problem is that now I have to change code everywhere someone made a insert/update/etc on this table (and don't forget the contraint!). I thought "I can make a view that do the right join" so the problem it's solved for all the select, but it's not working for the insert, because I'm updating 2 tables... Is there a way to solve this problem? My goal is to rename my original table "original_table" in "original_table_smaller" (with one less column) and create a view (or something like a view) called "original_table" that work like the original table. Is this possible? 



Total Post:604

Posted on    May-02-2013 8:12 AM

Hi Goti!

Check with this query:

select * from user_updatable_columns where table_name = 'VIEW_NAME';

Don't want to miss updates? Please click the below button!

Follow MindStick