Comandos sql

Páginas: 4 (994 palabras) Publicado: 12 de octubre de 2010
TRABAJO SQL

1. Mostrar Código, Nombre, Precio de artículos con precio entre 1000 y 3000.

SELECT CODIGO, NOMBRE, PRECIO
FROM ARTICULO
WHERE PRECIO>=1000 AND PRECIO<=3000;

2.Mostrar todos los artículos donde Proveedor sea Colgate Palmoliove.

SELECT *
FROM ARTICULO
WHERE CODPROVEEDOR=101;

3. Mostrar Código, Nombre, Precio, Fecha Ingreso de artículos con FechaIngreso entre 6/24/2010 y 6/27/2010.

SELECT CODIGO, NOMBRE, PRECIO, FINGRESO
FROM ARTICULO
WHERE FINGRESO>= #6/24/2010# AND FINGRESO<= #6/27/2010#;

4. Mostrar Código, Nombre, Preciode artículos y Nombre del proveedor

SELECT ARTICULO.CODIGO, ARTICULO.NOMBRE, ARTICULO.PRECIO, PROVEEDOR.CODIGO, PROVEEDOR.NOMBRE
FROM PROVEEDOR , ARTICULO
WHERE PROVEEDOR.CODIGO =ARTICULO.CODPROVEEDOR;

5. Mostrar Código, Nombre, Precio de artículos y Nombre de la Presentacion, en donde la presentación sea Bolsa de 500 Grms

SELECT ARTICULO.CODIGO, ARTICULO.NOMBRE,ARTICULO.PRECIO, PRESENTACION.NOMBRE
FROM ARTICULO, PRESENTACION
WHERE ARTICULO.CODPRESENTACION = PRESENTACION.CODIGO AND ARTICULO.CODPRESENTACION=100;


6. Mostrar Código, Nombre, Precio de artículos,Nombre del Tipo, en donde Codigo este entre 102 y 107.

SELECT ARTICULO.CODIGO, ARTICULO.NOMBRE, ARTICULO.PRECIO, TIPO.NOMBRE
FROM TIPO TIPO.CODIGO = ARTICULO.CODTIPO
WHERE (ARTICULO.CODTIPO =TIPO.CODIGO) AND (TIPO.CODIGO=102 OR TIPO.CODIGO=107);

7. Mostrar todo de artículos en donde Codigo este entre 110 y 140, y Codigo Tipo sea 100 O 104.

SELECT *
FROM ARTICULO
WHERE(CODIGO>=110 AND CODIGO<=140) AND (CODTIPO=100 OR CODTIPO=104);

8. Mostrar todo de artículos en donde Seccion sea Aseo y Rancho_y_Licores.

SELECT *
FROM ARTICULO
WHERE CODSECCION = 100 ORCODSECCION = 102;

9. Mostrar Código, Nombre, Precio de artículos, Nombre del Proveedor, Nombre de la ciudad, en donde el Codigo de la Ciudad sea 103.

SELECT ARTICULO.CODIGO, ARTICULO.NOMBRE,...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Comandos Sql
  • Comandos sql
  • sql comandos
  • Comandos Sql
  • comandos sql
  • Comandos sql
  • Sql Comandos
  • sql comandos

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS