I'm using oracle plsql and I have a question. I have table of Tests and Table of Schools.
How can I make a query that will put null or some other by my demands?
I mean, to put null or some numeric number in the execution.
I'm using oracle plsql and I have a question. I have table of Tests and Table of Schools.
How can I make a query that will put null or some other by my demands?
I mean, to put null or some numeric number in the execution.
Maybe something like this:
Schools-table
create table schools (name varchar(20));
insert into schools values ('Harvard');
insert into schools values ('Oxford');
insert into schools values ('Cambridge');
Tests-table
create table tests (name varchar(20), school varchar(20));
insert into tests values ('Math', 'Harvard');
insert into tests values ('Math', 'Oxford');
Left join
select
s.name,
t.name
from
schools s
left join
tests t on t.school = s.name;
Output
| name | name |
|-----------|--------|
| Harvard | Math |
| Oxford | Math |
| Cambridge | (null) |