Thread View: pl.comp.bazy-danych
2 messages
2 total messages
Started by Cezary Grądys
Sun, 04 Jul 2021 10:56
Postgresql ponumerowanie wierszy
Author: Cezary Grądys
Date: Sun, 04 Jul 2021 10:56
Date: Sun, 04 Jul 2021 10:56
10 lines
1467 bytes
1467 bytes
Witam. Chciałbym wstawić liczbę porzadkową do pola tabeli, potrzebuje, żeby używać w ORDER BY (będzie wklejane do excela, dlatego kolejność musi być zachowana) Chciałem wykorzystać oid, ale tabela jest bez tego pola. Może coś z generate_series dało by się zrobić? -- Cezary Grądys czarekgr@wa.onet.pl
Re: Postgresql ponumerowanie wierszy
Author: Adam M
Date: Tue, 06 Jul 2021 14:15
Date: Tue, 06 Jul 2021 14:15
13 lines
1690 bytes
1690 bytes
On Sunday, July 4, 2021 at 6:56:53 AM UTC-4, Cezary Grądys wrote: > Witam. > Chciałbym wstawić liczbę porzadkową do pola tabeli, potrzebuje, żeby > używać w ORDER BY (będzie wklejane do excela, dlatego kolejność musi być > zachowana) > Chciałem wykorzystać oid, ale tabela jest bez tego pola. > Może coś z generate_series dało by się zrobić? > > -- > Cezary Grądys > czar...@wa.onet.pl Sprobuj row_number() https://www.postgresqltutorial.com/postgresql-row_number/
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads