Article View: pl.comp.bazy-danych
Article #195173Re: [mySQL] insert/update ?
From: Borneq
Date: Tue, 03 Jan 2017 19:32
Date: Tue, 03 Jan 2017 19:32
15 lines
1353 bytes
1353 bytes
W dniu 03.01.2017 o 19:11, Borneq pisze: > czy w moim przypadku jest coś takiego ? Jest coś takiego jak REPLACE dev.mysql.com/doc/refman/5.7/en/replace.html ale "REPLACE works exactly like INSERT, except that if an old row in the table has the same value as a new row for a PRIMARY KEY or a UNIQUE index, the old row is deleted" Działa bardziej jak Insert, a nie Update. Co zrobić gdy mam klucz primary, chcę zmienić jedno pole a wszystkie inne (czy drugie) zostawić bez zmian?
Technical Details
Message-ID:
<o4gu8v$77u$1@node1.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-mailReferences:
<o4gpgv$91d$1@node2.news.atman.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: [mySQL] insert/update ? Date: Tue, 3 Jan 2017 20:32:49 +0100 Organization: ATMAN - ATM S.A. Lines: 15 Message-ID: <o4gu8v$77u$1@node1.news.atman.pl> References: <o4gpgv$91d$1@node2.news.atman.pl> NNTP-Posting-Host: 91.239.205.105 Mime-Version: 1.0 X-Trace: node1.news.atman.pl 1483471967 7422 91.239.205.105 (3 Jan 2017 19:32:47 GMT) X-Complaints-To: usenet@atman.pl NNTP-Posting-Date: Tue, 3 Jan 2017 19:32:47 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 In-Reply-To: <o4gpgv$91d$1@node2.news.atman.pl> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit