INSERT always places data at the "end" of the table. SQL makes no assumptions
about the ordering of data. If you specify no order, you get "arrival
sequence", being the order the data was written to the table. If you want to
see the data in a certain order, you must order it with the ORDER BY clause on
a select statement.

If, however, you only want 4 SEC_IDs in your table at any time, instead of
INSERTing the data you must UPDATE the rows for the four SEC_IDs. (Other
databases also offer a REPLACE INTO syntax that either updates the data or
inserts a new row depending on a primary key match.)

HTH,
Loyd

On Fri, 16 Nov 2001 18:42:46 -0000, "Sandeep Murthy"
<[EMAIL PROTECTED]> wrote:

>Hi all,
>
>I am trying to insert data from a form which has 4 fields such that the data
>always sits at the top in my database occupying locations :
>
>SEC_ID: 1, 2 , 3 & 4
>
>Everytime i insert data the data gets appended at the end i,e, if  the first
>4 fields are occupied my data takes the postions 5,6,7 & 8 but this wont
>do..
>
>Can anyone pl help me out with a suitable query to achieve the same??
>
>TIA and hv a great weekend,
>sandeep
>
>---------------------------------------------------------------------
>Before posting, please check:
>   http://www.mysql.com/manual.php   (the manual)
>   http://lists.mysql.com/           (the list archive)
>
>To request this thread, e-mail <[EMAIL PROTECTED]>
>To unsubscribe, e-mail <[EMAIL PROTECTED]>
>Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
>

--  
"How much would you pay for your life?"
"More than I would take to give it up."
[EMAIL PROTECTED]  ICQ#504581  http://lgoodbar2.pointclark.net/

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to