MANUAL DE SQL
|
|
CONSULTA
/*Consultar con las placas que inicien con la letra "p"*/
select*from omnibus where left(placa,1)="P"
go
/*consultar por los omnibus que sean de la marca "Ford"*/
select*from omnibus where Marca='Asia'
go
/*Agregar la columna año*/
alter table omnibus add Año numeric(4)
go
/*registrar el año 1995 a las placas "PQ29186"*/
update omnibus set Año=1995 where placa='PQ29186'
update omnibus set Año=1995 where placa='PQ29186'
update omnibus set Año=1995 where placa='RQ35689'
update omnibus set Año=1995 where placa='En56457'
update omnibus set Año=1995 where placa='PQ24785'
update omnibus set Año=1995 where placa='PA36186'
select*from omnibus/*Consultar por todasd las tablas que existen en la bases de datos viajes*/
select*from sysobjects where tipe=’u’
Bases De Datos-------Funciones------Procedimientos Almacenados------Consultas
©Copyrigth 2003 Todos los Derechos Reservados
Maria Afan Medrano
E-mail: mariaafan@hotmail.com
Av.Iquitos 1391
Lima- Peru