• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • 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

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Oracle question

    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.

    #2
    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

    Comment


      #3
      Thanks, I'll give it a go

      Comment

      Working...
      X