Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Dieser verflixte REPLACE Befehl

Empfohlene Antworten

Hallo Leute,

ich möchte gerne einen Datensatz in meiner Datenbank (id, name, nachname, alter) ersetzen mit dem REPLACE Befehl.

Ich habe folgendes gemacht:

REPLACE INTO daten (nachname, alter) VALUES (Hubert, 28)

Geht das mit dem REPLACE Befehl so oder was mache ich falsch, er ersetzt mir mal so rein gar nichts :confused:

Danke für eure Hilfe

Hi,

laut Manual schon...

http://dev.mysql.com/doc/mysql/en/replace.html

Befindet sich in dieser Tabelle bereits ein Datensatz mit diesen Werten?

Sonst würde ja wie auch im Manual steht nichts passieren:

EPLACE works exactly like INSERT, except that if an old record in the table has the same value as a new record for a PRIMARY KEY or a UNIQUE index, the old record is deleted before the new record is inserted.

Gruß,

Markus

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.