Skip to content

Instantly share code, notes, and snippets.

@SyNeto
Last active December 20, 2015 19:08
Show Gist options
  • Save SyNeto/6180749 to your computer and use it in GitHub Desktop.
Save SyNeto/6180749 to your computer and use it in GitHub Desktop.
sql migracion
/* SELECT INSERT */
INSERT INTO ecos.articulos_articulo (usuario_id, titulo, contenido, estado, destacado, creado, modificado)
SELECT 1, title, body, 'a', 0, now(), now() FROM ecos_back.posts
/* REPITED ROWS in VALUE */
SELECT name, COUNT(*) c FROM table GROUP BY name HAVING c > 1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment