-- This example will help us visualized the differences between the joins on tables


--The command sp_help gives me information on an object
--sp_help 'Rep'


insert into rep
(repnum,FirstName,LastName)
values
(28, 'Knowshon' ,'Moreno')

select * from rep

--sp_help 'Customer'


insert into customer
(customernum,customername)
values
(99,'Ha Ha Industries')

select * from customer

--Left Join
select * from rep left join customer on rep.repnum = customer.RepNum


--Inner Join
select * from rep inner join customer on rep.repnum = customer.RepNum

--Right Join
select * from rep right join customer on rep.repnum = customer.RepNum

--Full Outer Join
select * from rep full outer join customer 
on rep.repnum = customer.RepNum

--delete
delete from rep where repnum = 28
delete from customer where CustomerNum = 99




