Essays.club - Ensayos gratis, notas de cursos, notas de libros, tareas, monografías y trabajos de investigación
Buscar

Create database Escuela

Enviado por   •  13 de Noviembre de 2018  •  932 Palabras (4 Páginas)  •  210 Visitas

Página 1 de 4

...

Insert into Alumno Values (15,'Diaz','Osaka','Gerardo',19,'Rio Rojo 402','5303-7423','IMA', 84)

Insert into Alumno Values (16,'Guzman','Gonzalez','Iran',19,'Rio Negro 459','6505-8423','IMA', 83)

Insert into Alumno Values (17,'Huerta','Puente','Abraham',19,'Rio Morelos 592','7406-9423','IAS', 80)

Insert into Alumno Values (18,'Cabeza de Vaca','Diaz','Dionicio',19,'Rio Atlas 452','8804-5523','IAS', 94)

Insert into Alumno Values (19,'Puente','Gutierrez','Dante',19,'Rio Rojo 442','1706-3423','LSCA', 92)

Insert into Alumno Values (20,'Martinez','Alba','Carlos',19,'Rio Negro 412','1904-2423','LSCA', 90)

/*Selecciona los que tengan un promedio de 90*/

select * from Alumno

where Promedio = 90

/*Selecciona los que tengan un promedio de 80*/

select * from Alumno

where Promedio = 80

/*Selecciona los que tengan un promedio de 70*/

select * from Alumno

where Promedio = 70

/*Ingrese 7 registros*/

Insert into Alumno Values (21,'flores','espinoza','erika',19,'jardines del campo 123','1904-1023','LSCA', 60)

Insert into Alumno Values (22,'rodriguez','galvan','karla',29,'jardines del tule 321','1904-2021','IAS', 80)

Insert into Alumno Values (23,'juarez','medellin','katia',18,'jardines del pino 012','1954-2423','IMA', 90)

Insert into Alumno Values (24,'elizondo','mendoza','karime',22,'jardines de la primavera 963','1804-3423','LCC', 70)

Insert into Alumno Values (25,'oliva','cisneros','leticia',23,'jardines del viento 741','1914-2993','IAS', 80)

Insert into Alumno Values (26,'hernadez','acevedo','lilia',24,'jardines del sol 852','1900-2883','LSCA', 90)

Insert into Alumno Values (27,'mateos','cepeda','sergio',25,'jardines de la luna','1904-0258','IAS', 60)

/*Elimine 5 de los registros ya agregados*/

DELETE from Alumno

where Matricula >20 and Matricula 26

select * from Alumno

/*Elimine el registro que contenga ApPat= Diaz y ApMat Osaka*/

delete from Alumno

where ap_pat = 'Diaz' and Ap_Mat= 'osaka'

/*Actualize El registro de Promedio 90 y ApMat Alba (Cambiar de 90 a 70)*/

update Alumno

set Promedio = 70

where Ap_Mat = 'Alba'

/*Seleccione los registros que contengan carrera LSCA e IAS*/

select * from Alumno

where carrera = 'IAS' OR carrera = 'LSCA'

/*Seleccione los registros que contengan carrera IMA o IAS*/

select * from Alumno

where carrera = 'IAS' OR carrera = 'IMA'

/*Seleccione los registros que contengan edad 19 y 22*/

select * from Alumno

where Edad = '19' OR Edad = '22'

/*Seleccione los registros que contengan carrera LSCA o IMA*/

select * from Alumno

where carrera = 'LSCA' OR carrera = 'ima'

/*Selecciona los Registros que contengan Promedios entre 80 y 100*/

select * from Alumno

where Promedio between 80 and 100

/*Seleccione los registros que contengan Edades entre 19 y 21*/

select * from Alumno

where Edad between 19 and 21

/*Seleccione los registros que no contengan edades de 21 a 25*/

select * from Alumno

where Edad not between 21 and 25

/*Seleccione los registros que no contengan promedios de 80 a 90*/

select * from Alumno

where Promedio not between 80 and 90

/*Seleccione los registros que no contengan Promedios entre 50 y 70*/

select * from Alumno

where Promedio not between 50 and 70

/*Muestre los alumnos con matricula 1, 7, 9, 12, 15, 18, 20*/

select * from alumno

where matricula in (1, 7, 9, 12, 15, 18, 20)

/*Muestre los alumnos con matricula 3, 6, 14, 4, 17, 16, 19*/

select * from alumno

where matricula in (3, 6, 14, 4, 17, 16, 19)

/*Muestre los alumnos con matricula que no sean 1, 7, 9, 12, 15, 18, 20*/

...

Descargar como  txt (8.3 Kb)   pdf (54.4 Kb)   docx (17.1 Kb)  
Leer 3 páginas más »
Disponible sólo en Essays.club