Databases Querying Relational Databases Subqueries Subqueries

YA Abidakadr
YA Abidakadr
Pro Student 2,017 Points

help without using the keyword in

select * from sale where customerid in ( select customerid from customer where gender like "f");

i should not use in. how?

1 Answer

ivana kantnerova
ivana kantnerova
12,986 Points

maybe, try this .. in the select there cannot be the same names of attributes ... i suppose you have to use the name of table too and ... gender like 'f' not "f"

select * from sale where sale.customerid in ( select customer.customerid from customer where gender like "f");