Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

  • Be the first to comment

  • Be the first to like this


  1. 1. Base de datos (MySQL)<br />Generandoscript de consultas y subconsultas<br /> <br />
  2. 2. Consultas multitabla<br />Unión <br />Composición <br />
  3. 3. UNION<br />SELECT nombreFROM tacategoria UNION SELECT marcaFROM taarticulo<br />SELECT nombre FROM tacategoriaUNION ALL SELECT marca FROM taarticulo<br />
  4. 4. Composición (CROSS JOIN - WHERE) <br />SELECT * FROM tacategoria<br />CROSS JOIN taarticulo<br />SELECT * <br />FROM <br />tacategoria, taarticulo<br />
  5. 5. Composición (CROSS JOIN) <br />SELECT tacategoria.Nombre, Marca <br />FROM <br />tacategoria, taarticulo<br />SELECT tacategoria.CodCategoria, tacategoria.Nombre, Marca <br />FROM <br />tacategoria, taarticulo<br />
  6. 6. Composición (INNER JOIN - ON) <br />SELECT * FROM tacategoria<br />INNER JOIN taarticulo<br />
  7. 7. IN<br />Select nombre FROM tacategoria where CodCategoria In (Select CodCategoria FROM taarticulo Where Precio < 200)<br />
  8. 8. CREACION DE VISTA <br />CREATE VIEW resumen AS SELECT Marca, Nombre, Imagen FROM taarticulo<br />