sábado, 5 de abril de 2014

Tarea 1

//se crea la tabla Analista
==============================================
CREATE TABLE analista
    (
    id_analista  integer     NOT NULL,
    nom_analista varchar(22) NOT NULL,
    ap_analista  varchar(22) NOT NULL,
    id_equipo integer     NOT NULL,
   
    CONSTRAINT id_analista_PK  PRIMARY KEY,
    CONSTRAINT id_equipo_FK FOREIGN KEY,
    );
==============================================
//se crea tabla Equipo
CREATE TABLE equipo
  (
    id_equipo     integer     NOT NULL,
    tipo_equipo   varchar(22) NOT NULL,
    marca_equipo  varchar(22) NOT NULL,
    modelo_equipo varchar(22) NOT NULL,
    falla_equipo  varchar(45) NOT NULL,
   
    CONSTRAINT id_equipo_PK PRIMARY KEY,
 
   );


==============================================
//poblamos la tabla Analista

INSERT INTO ANALISTA VALUES (200, 'Cristopher' 'Canales''0003');
INSERT INTO ANALISTA VALUES (201, 'Gabriel' 'Lois''0002');
INSERT INTO ANALISTA VALUES (202, 'Mario' 'Contreras''0001');
===============================================
//poblamos la tabla Equipo
INSERT INTO EQUIPO VALUES (0001, 'Laptop' 'Toshiba' 'Convertible' 'Pantalla');
INSERT INTO EQUIPO VALUES (0002, 'Desktop' 'Acer' '5050' 'SO');
INSERT INTO EQUIPO VALUES (0003, 'Laptop' 'Sony' 'Vaio' 'Placa madre');

2 comentarios:

A las 10 de abril de 2014, 6:30 , Blogger Unknown ha dicho...

Este comentario ha sido eliminado por el autor.

 
A las 11 de abril de 2014, 20:20 , Blogger Unknown ha dicho...

Este comentario ha sido eliminado por el autor.

 

Publicar un comentario

Suscribirse a Enviar comentarios [Atom]

<< Inicio