{"id":2728,"date":"2023-02-01T21:32:20","date_gmt":"2023-02-01T20:32:20","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2728"},"modified":"2023-02-01T21:33:28","modified_gmt":"2023-02-01T20:33:28","slug":"update-a-mysql-table-replacing-it","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2728","title":{"rendered":"Update a mysql table replacing it"},"content":{"rendered":"\n<p>Replacing a table with the same name, I mean. You have to add, before &#8220;CREATE TABLE tablename&#8221; this row:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>DROP TABLE tablename;<\/code><\/pre>\n\n\n\n<p>You can also add single rows, exporting them, and importing in a sql query, like the following:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">INSERT INTO <code>bibliografie<\/code> (<code>ID<\/code>, <code>autore<\/code>, <code>autore_nome<\/code>, <code>titolo<\/code>, <code>imagelink<\/code>, <code>sigla<\/code>, <code>tipologia<\/code>, <code>curatori<\/code>, <code>curatore_unico<\/code>, <code>opera<\/code>, <code>rivista<\/code>, <code>num<\/code>, <code>pagg<\/code>, <code>edizione<\/code>, <code>luogo<\/code>, <code>data<\/code>, <code>data_spec<\/code>, <code>trad_titolo<\/code>, <code>trad_edizione<\/code>, <code>trad_luogo<\/code>, <code>trad_data<\/code>, <code>contenuti<\/code>, <code>keywords<\/code>, <code>reperibilita<\/code>, <code>letto<\/code>, <code>letto_quando<\/code>, <code>valutazione<\/code>, <code>riferito<\/code>, <code>destinazione<\/code>, <code>ambito<\/code>, <code>href<\/code>, <code>ad_code<\/code>) VALUES<br>(1880, 'Godechot', 'Jacques', 'La R\u00e9volution fran\u00e7aise : chronologie comment\u00e9e, suivie de notices biographiques sur les personnages cit\u00e9s', NULL, 'Godechot [1988]', 'libro', NULL, NULL, NULL, NULL, NULL, NULL, 'Perrin', 'Paris', '1988', NULL, 'La Rivoluzione francese. Cronologia commentata 1787-1799', 'Bompiani', 'Milano', '2001', '', 'Rivoluzione francese ', NULL, NULL, NULL, NULL, NULL, NULL, 'storia', NULL, NULL);<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Replacing a table with the same name, I mean. You have to add, before &#8220;CREATE TABLE tablename&#8221; this row: You can also add single rows, exporting them, and importing in a sql query, like the following: INSERT INTO bibliografie (ID, autore, autore_nome, titolo, imagelink, sigla, tipologia, curatori, curatore_unico, opera, rivista, num, pagg, edizione, luogo, data, &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/digitalia.culturanuova.net\/blog\/?p=2728\" class=\"more-link\">Leggi tutto<span class=\"screen-reader-text\"> &#8220;Update a mysql table replacing it&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[579,566],"tags":[11],"class_list":["post-2728","post","type-post","status-publish","format-standard","hentry","category-database","category-webmaster","tag-mysql"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2728"}],"version-history":[{"count":4,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2728\/revisions"}],"predecessor-version":[{"id":2732,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2728\/revisions\/2732"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2728"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}