Você está na página 1de 1

Create database bd1; Use bd1, Create table t1( Id not null primary key, Nombre varchar(10) not

not null, Precio decimal(10,2) not null, Fecha date not null); Insert into t1 (id, nombre, precio, fecha)values (1, pepsi, 7.50, 2014-03-02) (edit.) Update t1 set nombre = pecsi where id = 1; Udate t1 set nombre = sopa Precio = 9.90 where id = 3; Delete from t1 where id = 4; Update t1 set precio = precio + 1; Update t1 set precio = precio + .50 Where id = 2; Update t1 set precio = 10 Where id = 2; Alter table t1 Alter colum Existencia varchar(15) not null; Update t1 set existencia = 50 where Id = 1 and id = 3; Update t1 set existencia = 90 where Id>=1 and id<=3; Select * from t1 where fechas = 2014-03-01 And fecha = 2014-03-31;

Você também pode gostar