0

I want to make an uptate to a table with thee following Statement:

UPDATE plz_buland_kreis SET KFZKZ='A' 
WHERE Kreis IN ( SELECT kreis FROM plz_buland_kreis WHERE Kreis LIKE 'Augsburg%' )

I get the following error:

MySQL meldet: 1093 - Table 'plz_buland_kreis' is specified twice, both as a target for 'UPDATE' and as a separate source for data

Is it possible to write this SQL-Statement correctly?

yunzen
  • 32,854
  • 11
  • 73
  • 106
Max Lindner
  • 171
  • 1
  • 1
  • 7

1 Answers1

3

You can try below -

Update plz_buland_kreis set KFZKZ='A' where Kreis like 'Augsburg%'
Fahmi
  • 37,315
  • 5
  • 22
  • 31