Article View: pl.comp.bazy-danych
Article #195743Re: Postgresql ponumerowanie wierszy
From: 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/
Technical Details
Message-ID:
<fae22a93-9672-4ea9-aa29-b56f3a52348bn@googlegroups.com>Path:
mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mailReferences:
<60e193f3$0$25418$65785112@news.neostrada.pl>Show Full Headers
Complete Article Headers
X-Received: by 2002:ac8:5e08:: with SMTP id h8mr2608872qtx.54.1625580927511; Tue, 06 Jul 2021 07:15:27 -0700 (PDT) X-Received: by 2002:a25:d758:: with SMTP id o85mr23742325ybg.429.1625580927134; Tue, 06 Jul 2021 07:15:27 -0700 (PDT) Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed.pionier.net.pl!2.eu.feeder.erje.net!feeder.erje.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: pl.comp.bazy-danych Date: Tue, 6 Jul 2021 07:15:26 -0700 (PDT) In-Reply-To: <60e193f3$0$25418$65785112@news.neostrada.pl> Injection-Info: google-groups.googlegroups.com; posting-host=50.248.133.1; posting-account=aFGPVQoAAADngh59qlchYygiuB87zBBU NNTP-Posting-Host: 50.248.133.1 References: <60e193f3$0$25418$65785112@news.neostrada.pl> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <fae22a93-9672-4ea9-aa29-b56f3a52348bn@googlegroups.com> Subject: Re: Postgresql ponumerowanie wierszy From: Adam M <amorawski@magna-power.com> Injection-Date: Tue, 06 Jul 2021 14:15:27 +0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit