Results 1 to 10 of 10

Thread: How can I add the locations to the existing members

  1. #1
    Junior Member
    Join Date
    Jun 2007
    Answers
    1

    How can I add the locations to the existing members

    How can I add a location into a column. I have inserted a colunm in an existing table suppose there was 4 columns in emp table (empno, ename, sal, dept) & have entered the data and and later on I remember that I have forgot to make the collumn LOC. I entered the LOC colunm now the question is this that How can I add the locations to the existing members?


  2. #2
    Contributing Member
    Join Date
    Apr 2007
    Answers
    46

    Re: How can I add the locations to the existing members

    ya u can do that..................

    As u r saying you have inserted new column so for inserting the values in that column u can use following:-

    update emp_table set LOC='ABC' where emp_no=123;

    make sure that emp_no is unique for every employee.


  3. #3
    Moderator
    Join Date
    Jun 2007
    Answers
    2,074

    Re: How can I add the locations to the existing members

    You need to use the update command with some condition .for that u need some sort of uniqueness in the existing record.


  4. #4
    Junior Member
    Join Date
    Feb 2007
    Answers
    26

    Re: How can I add the locations to the existing members

    this can be done by simply updating the table


  5. #5
    Junior Member
    Join Date
    Aug 2007
    Answers
    7

    Re: How can I add the locations to the existing members

    u can add using following commands :
    alter table tablename add column datatype(len)[defaule val] constraints;


  6. #6
    Junior Member
    Join Date
    Aug 2007
    Answers
    2

    Re: How can I add the locations to the existing members

    You can do this by using UPDATE command. Depending on the primary and alternate keys set up for this table, using member number as an index of the table allows for faster inserts.

    Last edited by mtiques; 08-20-2007 at 12:51 PM.

  7. #7
    Junior Member
    Join Date
    Aug 2007
    Answers
    2

    Smile Re: How can I add the locations to the existing members

    You can do this by using UPDATE command. Depending on the primary and alternate keys set up for this table, using member number as an index of the table allows for faster updates.


  8. #8
    Junior Member
    Join Date
    Jul 2007
    Answers
    5

    Re: How can I add the locations to the existing members

    you can insert the column into the existing table through the following syntax
    alter table add datatype;
    by this column only get inserted into ur table.to enter values into the value you have to use update command
    update set =
    where =;

    for further references about queries refer dbms book author name is raghuramakrishnan,
    bye,takecare................................


  9. #9
    Junior Member
    Join Date
    Jul 2007
    Answers
    5

    Re: How can I add the locations to the existing members

    you can insert the column into the existing table through the following syntax
    alter table add datatype[/SIZE];
    by this column only get inserted into ur table.to enter values into the value you have to use update command
    update set =
    where =;
    for further references about queries refer dbms book author name is raghuramakrishnan,
    bye,takecare................................


  10. #10
    Junior Member
    Join Date
    Jul 2007
    Answers
    5

    Re: How can I add the locations to the existing members

    you can insert the column into the existing table through the following syntax
    alter table tablename add attributeName datatype[/SIZE];
    by this column only get inserted into ur table.to enter values into the value you have to use update command
    update tablename set attributeName = attribute value
    where primary Key = key value of arow in which you want to enter attribute value;
    for further references about queries refer dbms book author name is raghuramakrishnan,
    bye,takecare................................


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