{"id":5307,"date":"2026-01-19T16:45:28","date_gmt":"2026-01-19T15:45:28","guid":{"rendered":"https:\/\/sutilweb.eu\/?page_id=5307"},"modified":"2026-01-19T16:45:29","modified_gmt":"2026-01-19T15:45:29","slug":"37-agregar-registros-en-mysql","status":"publish","type":"page","link":"https:\/\/sutilweb.eu\/index.php\/lenguajes\/php\/php-practico\/37-agregar-registros-en-mysql\/","title":{"rendered":"37. Agregar registros en MySQL"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Para agregar registros desde Workbench vamos a nuestra base de datos, nuestra tabla, y haciendo clic con el bot\u00f3n derecho hacemos clic en la primera opci\u00f3n,&nbsp;<strong><em>Select Rows &#8211; Limit 1000<\/em><\/strong>. Nos aparecer\u00e1 una tabla m\u00e1s abajo con todos los campos, y en el registro correspondiente que tendr\u00e1 por defecto un valor <strong><em>NULL<\/em><\/strong> iremos sustituyendo dicho valor por el que queramos poner.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Para hacerlo v\u00eda c\u00f3digo SQL volvemos a hacer clic en el bot\u00f3n SQL de arriba a la izquierda, se abrir\u00e1 la consola SQL, y escribimos el siguiente c\u00f3digo.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Ejm<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>INSERT INTO `ejemplo`.`contactos`\n(`nombre`, `apellido`, `direccion`, `tlfo`, `email`, `fecha_nacimiento`, `familia`)\nVALUES (\"Beatriz\", \"Vecin\", \"C\/ Falsa\", \"987654321\", \"beatriz@gmail.com\", \"1991-02-02\", \"0\");<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Para agregar registros desde Workbench vamos a nuestra base de datos, nuestra tabla, y haciendo clic con el bot\u00f3n derecho hacemos clic en la primera opci\u00f3n,&nbsp;Select Rows &#8211; Limit 1000. Nos aparecer\u00e1 una tabla m\u00e1s abajo con todos los campos, y en el registro correspondiente que tendr\u00e1 por defecto un valor NULL iremos sustituyendo dicho [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":4518,"menu_order":36,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"class_list":["post-5307","page","type-page","status-publish","hentry"],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"Sutil Web","author_link":"https:\/\/sutilweb.eu\/index.php\/author\/sutilweb\/"},"uagb_comment_info":0,"uagb_excerpt":"Para agregar registros desde Workbench vamos a nuestra base de datos, nuestra tabla, y haciendo clic con el bot\u00f3n derecho hacemos clic en la primera opci\u00f3n,&nbsp;Select Rows &#8211; Limit 1000. Nos aparecer\u00e1 una tabla m\u00e1s abajo con todos los campos, y en el registro correspondiente que tendr\u00e1 por defecto un valor NULL iremos sustituyendo dicho&hellip;","_links":{"self":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/5307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/comments?post=5307"}],"version-history":[{"count":2,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/5307\/revisions"}],"predecessor-version":[{"id":5309,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/5307\/revisions\/5309"}],"up":[{"embeddable":true,"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/pages\/4518"}],"wp:attachment":[{"href":"https:\/\/sutilweb.eu\/index.php\/wp-json\/wp\/v2\/media?parent=5307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}