I used the following SQL to automatically generate the RowNumber column
SELECT A.id, (SELECT COUNT(*) FROM packing_ship_mark_1a WHERE A.ID>=ID) AS RowNum
FROM packing_ship_mark_1a AS A;
id RowNumber
596 24
568 1
571 2
572 3
573 4
574 5
575 6
576 7
577 8
578 9
579 10
597 25
581 11
582 12
585 13
586 14
587 15
588 16
589 17
590 18
591 19
592 20
593 21
594 22
595 23
But the RowNumber is not displayed as I expected. How can I achieve the following result?
596 1
568 2
571 3
572 4
573 5
574 6
575 7
576 8
577 9
578 10
579 11
597 12
582 13
581 14
585 15
587 16
588 17
589 18
590 19
591 20
592 21
593 22
594 23
595 24
586 25
SELECT A.id, (SELECT COUNT(*) FROM packing_ship_mark_1a WHERE A.ID>=ID) AS RowNum
FROM packing_ship_mark_1a AS A;
id RowNumber
596 24
568 1
571 2
572 3
573 4
574 5
575 6
576 7
577 8
578 9
579 10
597 25
581 11
582 12
585 13
586 14
587 15
588 16
589 17
590 18
591 19
592 20
593 21
594 22
595 23
But the RowNumber is not displayed as I expected. How can I achieve the following result?
596 1
568 2
571 3
572 4
573 5
574 6
575 7
576 8
577 9
578 10
579 11
597 12
582 13
581 14
585 15
587 16
588 17
589 18
590 19
591 20
592 21
593 22
594 23
595 24
586 25