ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

Créate database alumno


Enviado por   •  27 de Agosto de 2017  •  Apuntes  •  287 Palabras (2 Páginas)  •  70 Visitas

Página 1 de 2

Créate database alunmo;

  1. Show databases;

  1. Use alumno;
  2. Show tables;

  1. Créate table alumno(value 1, value 2,);
  2. Describe alumno;
  1. Insert into alumnos values(Value 1, value 2……);
  2. Select * from alumnos;
  1. Select apellido from alumnos;
  1. Select * from alumnos where sexo=”M”;
  1. Select * from alumnos  where edad < 18;
  1. select * from alumnos where Nombre>= ‘L’;
  1. delete from alumnos where id =1;
  1. Primary key(name));
  1. Rename table administrativo to admin;
  2. Show tables;
  1. Rename table admin1 to administrativo1, admin2 to administrativo2;
  2. Update alumnos

Set Nombre= ‘Maria’

Where id=2;

  1. Select * from alumnos where edad <=18;
  1. Select * from alumnos where Nombre =’Jorge’;
  2. Select * from alumnos where Nombre <>’Jorge’;
  3. Select * from alumnos where edad >18;
  4. Select * from alumnos where Nombre like %maria%;(mostrara todo nombre que tenga maria)
  1. Select * from alumnos where Nombre like ‘_aria’;(mostrara todos los nombres con terminación aria).
  1. Select * from alumnos where sexo = ‘F’ and edad <=18;
  1. Select * from alumnos where sexo = ‘F’ or edad <=18;
  1. Select * from alumnos order by Nombre asc;
  1. Select * from alumnos order by Nombre desc;
  1. Select * from alumnos where Nombre between ‘Jorge ’ and ‘Maria’;
  1. Select count(*)(devuelve el total de filas seleccionadas);
  1. Select sum(*)(devuelve la suma total de la fila);
  1. Select min(*)(devuelve el valor minimo);
  2. Select max(*)(devuelve el valor maximo);
  3. Select AVG(*)(devuelve el valor de la mediana);
  4. drop database nombre;
  1. create table nuevatabla like tablavieja; (copiar tablas(solo estructura))
  2. create tabla nombretabla select * from tablavieja;
  1. drop table nombre;
  1. select nombre, apellido from alumnos order by sexo asc;
  1. select nombre, apellido from alumnos order by sexo desc;
  1. insert into alumnos values(‘jorge’,’guillen’……..);
  2. insert into alumnos( id, Nombre, apellido, sexo, edad,) values((‘jorge’,’guillen’……..);
  1. select * from alumnos where nombre <= ‘L’;
  1. SELECT personas.nombre, direccion, ciudades.nombre FROM personas, ciudades;

...

Descargar como (para miembros actualizados)  txt (2.3 Kb)   pdf (52.3 Kb)   docx (11.9 Kb)  
Leer 1 página más »
Disponible sólo en Clubensayos.com