Results 1 to 13 of 13

Thread: Add a new column to a table and insert values

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Expert Member
    Join Date
    Sep 2006
    Answers
    477

    Re: Add a new column to a table and insert values

    It is simple task as long as your new column allows NULLs.
    Take a back up of existing table and then go on to add the column.

    select * intoo emp_backup from emp.

    ALTER TABLE EMP
    ADD emp_email varchar2(40);

    This will add the column emp_email to emp table.

    Now to add a value to this column, you should use UPDATE statement. Simple as that.

    Cheers!
    Kalayama

    [COLOR="Blue"][SIZE="2"]"If you are not living on the edge of your life, you are wasting space"[/SIZE][/COLOR]

    Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"

  2. #2
    Junior Member
    Join Date
    Oct 2008
    Answers
    1

    Re: Add a new column to a table and insert values

    Quote Originally Posted by kalayama View Post
    It is simple task as long as your new column allows NULLs.
    Take a back up of existing table and then go on to add the column.

    select * intoo emp_backup from emp.

    ALTER TABLE EMP
    ADD emp_email varchar2(40);

    This will add the column emp_email to emp table.

    Now to add a value to this column, you should use UPDATE statement. Simple as that.

    Cheers!
    Kalayama
    what is table mutation error and what is the occation it will happen


  3. #3
    Expert Member
    Join Date
    Sep 2007
    Answers
    697

    Re: Add a new column to a table and insert values

    >>what is table mutation error and what is the occation it will happen

    Follow the link


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact