• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Oracle question

  • Thread starter Thread starter Wibs
  • Start date Start date
W

Wibs

Guest
I've been given the job of creating a table in Oracle (I believe the version is 9.2, but can't say for sure), but I'm from an AS400 background and haven't used Oracle before, so have got myself a little bit stuck on something....

I created the table fine, but my colleagues would like each column to have two different names....
For instance, column named M_COID they would also like to be able to use CORRELATIONID as another name. I know that I can do this in a Select using AS, but how about when updating or inserting?

This is for an app that's getting ported from the AS400 where we are currently able to do this without any probs, but I just can't figure it for Oracle.

Any suggestions would be most welcome.
 
Something like this will work. Make sure you include all the fields from the base table in the view if you want to update the table.

create view viewname (M_COID, CORRELATIONID) as
select M_COID, M_COID
from tablename
 

Advertisers

Back
Top