show databases;
create database prueba1;
use prueba1;
create table clientes(
nombre varchar(50),
dir varchar(200),
tel varchar(30));
insert into clientes values('rodrigo','aragon','55555');
insert into clientes values('juan','aragon','77777');
insert into clientes values('paco','polanco','33333');
insert into clientes values('erick','lindavista','44444');
insert into clientes values('fernando','lindavista','2222');
select * from clientes;
select nombre,dir from clientes;
select tel from clientes;
select * from clientes where nombre="rodrigo";
select * from clientes where dir="polanco";
select * from clientes where dir="lindavista";
select * from clientes where dir="lindavista" and nombre="fernando";
select * from clientes where dir="lindavista" and nombre="fernando" or tel="77777";
select * from clientes where dir="lindavista" and nombre="fern" or tel="77777";
select * from clientes where dir="lindavista" order by nombre;
update clientes set nombre="rodrigo igor" where nombre="rodrigo";
update clientes set nombre="miguel" where dir="lindavista" and tel="2222";
delete from clientes where nombre="rodrigo igor";
delete from clientes where dir="lindavista" and nombre="miguel";
jueves, 7 de abril de 2011
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario