Inserting record between table rows

Sherzod Mutalov shmutalov at gmail.com
Fri Jul 31 13:39:19 CEST 2015


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



More information about the developers-list mailing list