Comandos select, sql

Page 1

Comandos select, sql Daniel L贸pez Garc铆a


SELECT nombre_sucursal FROM prestamo


SELECT DISTINCT nombre_sucursal FROM prestamo


SELECT ALL nombre_sucursal FROM prestamo


SELECT nombre_sucursal,

num_prestamo, importe *100 FROM prestamo


SELECT num_prestamo FROM prestamo WHERE nombre_sucursal = 'Navacerrada' AND importe >1200


SELECT num_prestamo FROM prestamo WHERE importe BETWEEN 90000 AND 100000


SELECT nombre_cliente, prestatario.num_prestamo, importe FROM prestatario, prestamo WHERE prestatario.num_prestamo = prestamo.num_prestamo


SELECT nombre_cliente, prestatario.num_prestamo, importe FROM prestatario, prestamo WHERE prestatario.num_prestamo = prestamo.num_prestamo AND nombre_sucursal = 'Navacerrada'


SELECT DISTINCT nombre_cliente, prestatario.num_prestamo, importe FROM prestatario, prestamo WHERE prestatario.num_prestamo = prestamo.num_prestamo


SELECT nombre_cliente, prestatario.num_prestamo AS id_prestamo, imp orte FROM prestatario, prestamo WHERE prestatario.num_prestamo = prestamo.num_prestamo


SELECT nombre_cliente, T.num_prestamo, S.importe FROM prestatario AS T, prestamo AS S WHERE T.num_prestamo = S.num_prestamo


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.