4
4
4sadly2020-07-25 22:24:31
Database design
4sadly, 2020-07-25 22:24:31

How to make positions in the database?

I have a plate in which the records should go in order
1 - position 1
2 - position 2
3 - position 3
4 - position 4
5 - position 5
I want, for example, to shift 1 element by 3 positions, it will be after 4 elements, the rest will move 1 forward
I would also like to be able to move the element to the end of the list
. How can this be done?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin Tsvetkov, 2020-07-25
@4sadly

shift 1 element by 3 positions
UPDATESET line = line + 3
move element to end of list

UPDATESET line = ( SELECT MAX(line) + 1 … )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question