Sei sulla pagina 1di 8

Utilizando DML

(Data Manipulation
Languaje)
Select, Insert, Update, Delete
Ing. Julio Aaron

Inspeccionar

select
Select * from Estudiantes
or
select [codigo], [nombre1], [apellido1]
from dbo.Estudiantes;

distinct
select distinct [codProg]
from dbo.Materias;

NULL
select distinct [codProg] from
dbo.Materias
where [codProg] = null ;
select distinct [codProg] from
dbo.Materias
where [codProg] != null ;

where
use Ejemplo1;
select * from dbo.Programas
where nombrePrograma='Programa
Null' and idFacultad='fac';

Operador like
use Ejemplo1
select * from Materias
where codProg like '%16%' and
nombreMat like '%Ciencia y
Tecnologia%' and
codEst='2008216024';

Funcin COUNT
use Ejemplo1
select COUNT(distinct codEst)
from Materias
where codProg like '%16%'

Potrebbero piacerti anche