Inserting record between table rows

Stefan Manegold Stefan.Manegold at cwi.nl
Fri Jul 31 14:07:33 CEST 2015


Hi Sherzod,

in relational algebra and thus in relational databases
physical position / order of records/tuples/rows has no semantical meaning.
Hence, there is not point and no way of inserting records between two rows
or at any other physical position.

Please resort to the standard SQL insert into statement to insert new tuples
into a table; the system will take care of storing it at the approriate physical
location --- which as said is irrelevant for any semantics.

Best,
Stefan

----- On Jul 31, 2015, at 1:39 PM, Sherzod Mutalov shmutalov at gmail.com wrote:

> Hello Developers,
> 
>    How can I insert record(s) between two rows of SQL table?
> 
> For example, I have table with three column and there are some records
> in it:
> 
>| column1 | column2 | column3 |
> -------------------------------
>|     123 | asffasf |    true |
> -------------------------------
>|     432 | lkjlkhk |   false |
> -------------------------------
>|     555 |   sadda |    true |
> -------------------------------
>|     ... |     ... |     ... |
> -------------------------------
> 
> I  need  to  add  a new record (555, "asdas", false) between first and
> second record of the existing table.
> 
> Result what I expect:
> 
>| column1 | column2 | column3 |
> -------------------------------
>|     123 | asffasf |    true |
> -------------------------------
>|     555 |   asdas |   false |
> -------------------------------
>|     432 | lkjlkhk |   false |
> -------------------------------
>|     555 |   sadda |    true |
> -------------------------------
>|     ... |     ... |     ... |
> -------------------------------
> 
> --
> Best regards,
> Sherzod                          mailto:shmutalov at gmail.com
> 
> _______________________________________________
> developers-list mailing list
> developers-list at monetdb.org
> https://www.monetdb.org/mailman/listinfo/developers-list

-- 
| Stefan.Manegold at CWI.nl | DB Architectures   (DA) |
| www.CWI.nl/~manegold/  | Science Park 123 (L321) |
| +31 (0)20 592-4212     | 1098 XG Amsterdam  (NL) |


More information about the developers-list mailing list