Thread View: pl.comp.bazy-danych
2 messages
2 total messages
Started by =?UTF-8?Q?Cezary
Sun, 04 Jul 2021 12:56
Postgresql ponumerowanie wierszy
Author: =?UTF-8?Q?Cezary
Date: Sun, 04 Jul 2021 12:56
Date: Sun, 04 Jul 2021 12:56
9 lines
322 bytes
322 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 07:15
Date: Tue, 06 Jul 2021 07:15
15 lines
597 bytes
597 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