🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.bazy-danych
Article #194952

Re: [SQL]Jak zastąpić wiersz tabeli?

#194952
From: Borneq
Date: Wed, 11 May 2016 18:44
9 lines
1332 bytes
W dniu 11.05.2016 o 20:23, wloochacz pisze:
> A więc, aby zastąpić wiersz trzeba wykonać UDPATE czyli:
>     UPDATE tabela
>         set pole1 = wartosc
>     where PolePK = WartoscKlucza

A jeśli nie wiem, czy dany wiersz istnieje? Najpierw wrzucam rekordy, 
potem wrzucam i niektóre mogą już istnieć - wtedy ma wykonać albo Insert 
albo Update.
Technical Details
Message-ID: <ngvuj3$onm$1@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <ngullf$fc2$1@node2.news.atman.pl> <nguq49$ifk$1@node1.news.atman.pl> <57337892$0$700$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Borneq <borneq@antyspam.hidden.pl>
Newsgroups: pl.comp.bazy-danych
Subject: Re: [SQL]Jak zastąpić wiersz tabeli?
Date: Wed, 11 May 2016 20:44:51 +0200
Organization: ATMAN - ATM S.A.
Lines: 11
Message-ID: <ngvuj3$onm$1@node2.news.atman.pl>
References: <ngullf$fc2$1@node2.news.atman.pl> <nguq49$ifk$1@node1.news.atman.pl> <57337892$0$700$65785112@news.neostrada.pl>
NNTP-Posting-Host: 91.239.205.105
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1462992291 25334 91.239.205.105 (11 May 2016 18:44:51 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Wed, 11 May 2016 18:44:51 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.0
In-Reply-To: <57337892$0$700$65785112@news.neostrada.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit