tforrest79
Technical User
Hi,
Ive created 2 example tables. These are:
TABLE 1
*******
Customer
Cust ID Name
1 Vince
2 Brian
3 Simon
4 Paul
5 James
6 John
TABLE 2
*******
Address
Address ID Address Customer ID
1 Vince Road 1
2 Brian Road 2
3 Simon Close 3
4 Paul Lane 4
6 Tracey Street
QUESTION
********
I want to write a query that displays customers with no address. What query do I write to ensure the output only lists customers with no address. In this example I would expect the output to display:
EXPECTED OUTPUT
***************
Cust ID Name
5 James
6 John
I've also created an address that does not have a customer. Do I use the same query to list all addresses that do not have a customer. In that case my expected output is:
EXPECTED OUTPUT:
Address ID Address Customer ID
6 Tracey Street
I would appreciate all of your feedback and look forward to a response.
Cheers,
T
Ive created 2 example tables. These are:
TABLE 1
*******
Customer
Cust ID Name
1 Vince
2 Brian
3 Simon
4 Paul
5 James
6 John
TABLE 2
*******
Address
Address ID Address Customer ID
1 Vince Road 1
2 Brian Road 2
3 Simon Close 3
4 Paul Lane 4
6 Tracey Street
QUESTION
********
I want to write a query that displays customers with no address. What query do I write to ensure the output only lists customers with no address. In this example I would expect the output to display:
EXPECTED OUTPUT
***************
Cust ID Name
5 James
6 John
I've also created an address that does not have a customer. Do I use the same query to list all addresses that do not have a customer. In that case my expected output is:
EXPECTED OUTPUT:
Address ID Address Customer ID
6 Tracey Street
I would appreciate all of your feedback and look forward to a response.
Cheers,
T