I have the following tables
create table Puesto
(
id_puesto int identity(1,1) primary key not null,
piso int,
cantidad_sillas int,
frente_ventana bit,
cantidad_computadoras int,
cantidad_sillas_adicionales int,
acceso_sala_reuniones bit
)
create table Alquiler
(
id_alquiler int identity(1,1) primary key not null,
id_puesto int,
foreign key (id_puesto) references Puesto (id_puesto),
dni_cliente int,
foreign key (dni_cliente) references Cliente (dni),
precio money,
adicion_ventana money,
adicion_computadoras money,
adicion_acceso_tiempolibre money,
adiccion_sillas money
)
And I need to get all those positions that are not for rent. For the following I deduce that I do not have to show all those Posts whose set_id is equal to the set_id of my Rent table. I have the following code but it does not give me the desired results.
SELECT Puesto.piso, Puesto.cantidad_sillas, Puesto.frente_ventana, Puesto.id_puesto, Alquiler.id_puesto
FROM Puesto, Alquiler
WHERE Puesto.id_puesto != Alquiler.id_puesto
I have tried using < > instead of ! = but the results are the same.