First run flush, repair, and optimize _________________________________________________________________________ UPDATE tax SET STD = 9, DATE = '1990-01-01', percent = 14 WHERE STD = 1; ____________________________Then_________________________________________ INSERT INTO tax (NAME, percent, STD, DATE) VALUES ('VAT', 15, 1, '2018-04-01'); ____________________________Then________________________________________ DELETE FROM menu_tax WHERE id > 0; ____________________________Then_____________ Now do flush, repaire and optimise and then ____________________________Then_____________ INSERT INTO menu_tax (menu_id,tax_id,DATE) SELECT id,2,CURRENT_DATE FROM menu; _____________________________________________ NOTES: First check that the tax table has only 1 table in as id 1. If like that, then above. If not like that, delete other lines, run flush, repair and optimize. Id must be i