INSERT INTO TOP ROW?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 6 of 6

Thread: INSERT INTO TOP ROW?

  1. #1
    Sharon Guest

    INSERT INTO TOP ROW?


    Hi everyone!
    Do you know how to write either ASP or stored procedure to insert a record
    into the table? I WOULD LIKE TO SEE THE INSERT INTO THE TOP ROW NOT THE BOTTOM
    ROW OF THE table. By convention, if you are trying to insert something into
    table, it will insert into the bottom row. I would like it to insert to the
    top row instead.

    Thank you!
    Sharon

  2. #2
    Arthur Wood Guest

    Re: INSERT INTO TOP ROW?


    Sharon,

    The concept of LAST ROW or TOP ROW does not have any real significance
    in a standard Relational Database. Why do you THINK that it is important
    to "INSERT INTO THE TOP ROW"?

    In general, you have no control at all over the ABSOLUTE location of any
    particualr record in the database.

    Arthur Wood

    "Sharon" <sharongarg@yahoo.com> wrote:
    >
    >Hi everyone!
    >Do you know how to write either ASP or stored procedure to insert a record
    >into the table? I WOULD LIKE TO SEE THE INSERT INTO THE TOP ROW NOT THE

    BOTTOM
    >ROW OF THE table. By convention, if you are trying to insert something

    into
    >table, it will insert into the bottom row. I would like it to insert to

    the
    >top row instead.
    >
    >Thank you!
    >Sharon



  3. #3
    Willy Van den Driessche Guest

    Re: INSERT INTO TOP ROW?

    That's right, if you do want control over that, you have to use the order by
    clauses.
    BTW, I think you want it in the top row of your grid, which would depend on
    the capabilities of the grid you are using. -Willy

    "Arthur Wood" <wooda@saic-trsc.com> wrote in message
    news:3b378585$1@news.devx.com...
    >
    > Sharon,
    >
    > The concept of LAST ROW or TOP ROW does not have any real significance
    > in a standard Relational Database. Why do you THINK that it is important
    > to "INSERT INTO THE TOP ROW"?
    >
    > In general, you have no control at all over the ABSOLUTE location of any
    > particualr record in the database.
    >
    > Arthur Wood
    >
    > "Sharon" <sharongarg@yahoo.com> wrote:
    > >
    > >Hi everyone!
    > >Do you know how to write either ASP or stored procedure to insert a

    record
    > >into the table? I WOULD LIKE TO SEE THE INSERT INTO THE TOP ROW NOT THE

    > BOTTOM
    > >ROW OF THE table. By convention, if you are trying to insert something

    > into
    > >table, it will insert into the bottom row. I would like it to insert to

    > the
    > >top row instead.
    > >
    > >Thank you!
    > >Sharon

    >




  4. #4
    Matthew Solnit Guest

    Re: INSERT INTO TOP ROW?

    "Arthur Wood" <wooda@saic-trsc.com> wrote in message
    news:3b378585$1@news.devx.com...
    > The concept of LAST ROW or TOP ROW does not have any real significance
    > in a standard Relational Database. Why do you THINK that it is important
    > to "INSERT INTO THE TOP ROW"?


    I agree that it doesn't make sense. But for educational purposes... couldn't
    this be done using a clustered index?

    -- Matthew Solnit



  5. #5
    Arthur Wood Guest

    Re: INSERT INTO TOP ROW?


    That would ONLY apply to SQL Server databases, and even then, for what purpose?

    Arthur Wood


    "Matthew Solnit" <msolnit@nospam.yahoo-com> wrote:
    >"Arthur Wood" <wooda@saic-trsc.com> wrote in message
    >news:3b378585$1@news.devx.com...
    >> The concept of LAST ROW or TOP ROW does not have any real significance
    >> in a standard Relational Database. Why do you THINK that it is important
    >> to "INSERT INTO THE TOP ROW"?

    >
    >I agree that it doesn't make sense. But for educational purposes... couldn't
    >this be done using a clustered index?
    >
    >-- Matthew Solnit
    >
    >



  6. #6
    Matthew Solnit Guest

    Re: INSERT INTO TOP ROW?

    "for educational purposes"

    I've just been educated in the study of clustered indexes being specific to SQL
    Server.

    ;-)

    "Arthur Wood" <wooda@saic-trsc.com> wrote in message
    news:3b3891ea@news.devx.com...
    >
    > That would ONLY apply to SQL Server databases, and even then, for what

    purpose?
    >
    > Arthur Wood
    >
    >
    > "Matthew Solnit" <msolnit@nospam.yahoo-com> wrote:
    > >"Arthur Wood" <wooda@saic-trsc.com> wrote in message
    > >news:3b378585$1@news.devx.com...
    > >> The concept of LAST ROW or TOP ROW does not have any real significance
    > >> in a standard Relational Database. Why do you THINK that it is important
    > >> to "INSERT INTO THE TOP ROW"?

    > >
    > >I agree that it doesn't make sense. But for educational purposes... couldn't
    > >this be done using a clustered index?




Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center