Q: Adding columns and data

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Geoff Jones

    #1

    Q: Adding columns and data

    Hi

    Can anybody help me with the following, hopefully simple, question?

    I have two tables. I wish to add a new column to the beginning of each table
    and to fill them with incremental values e.g. if one of the tables looks
    like this:

    23 56
    45 87
    21 67
    34 09

    I'd like it to be changed into:

    1 23 56
    2 45 87
    3 21 67
    4 34 09

    Can anybody help?

    Thanks in advance

    Geoff


  • Aggro

    #2
    Re: Q: Adding columns and data

    Geoff Jones wrote:
    [color=blue]
    > 23 56
    > 45 87
    > 21 67
    > 34 09
    >
    > I'd like it to be changed into:
    >
    > 1 23 56
    > 2 45 87
    > 3 21 67
    > 4 34 09[/color]

    If there are no other columns you can add the column and get inc.
    numbers in it, but the order could be anything in theory. i.e.:

    Instead of:
    1 23 56
    2 45 87
    3 21 67
    4 34 09

    You could end up with:
    1 34 09
    2 45 87
    3 21 67
    4 23 56

    Normally the order can be the same as it was when inserting rows, but
    like I said, there no guarantee, and chances go worse if rows have been
    removed and added in the table. Does this matter?

    Comment

    Working...