SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
create table loan_applications (id int primary key auto_increment, name text, childrens int); insert into loan_applications (name, childrens) values ('John', 1), ('Sarah', 3), ('John', 5); select * from loan_applications; select distinct loan_applications.name from loan_applications join loan_applications copy on loan_applications.childrens <> copy.childrens and loan_applications.name = copy.name ; select distinct name from loan_applications where exists ( select childrens from loan_applications copy where loan_applications.childrens <> copy.childrens and loan_applications.name = copy.name );

Stuck with a problem? Got Error? Ask ChatGPT!

Copy Clear