Create a FUNCTION that will print out an address label for the TAL Distributors database using the Customer table. You can specify the customer table to output the address.
Here is an example of the output expected:
Toys Galore
28 Laketon St.
Fullton, CA 90085
The database name is "TAL Distributors" and images of all the tables have been attached. Please double check that function executes before answering.
Customer Table:
![SQLQueryl.sgl . (L (SOM.Jonesl58 (54)) × SELECT TOP (1000) [Customer-Num] , [Customer_Name] , [Street] ,[City] [State] ,[Zip]](http://img.homeworklib.com/images/e32e08b4-ea1f-44d4-9b2e-cc799159ba1f.png?x-oss-process=image/resize,w_560)
drop table customer cascade constraints;
create table customer(customer_num int primary key,
Customer_name varchar(25),
street
varchar(25),
City
varchar(10),
State
char(2),
ZIp1
varchar2(25),
Balance
number(10,2),
Credit_limit number(10,2),
Rep_num
int);
insert into customer values(00001,'Jones Jim','811 Montervideo
Dr','Lansing','MI','48823',1000.00,10000.00,1);
insert into customer values(00002,'Richardson Jamila','4216 W Outer
Drive','Detriot','MI','48204',500.00,50000.00,2);
set serveroutput on;
CREATE or replace function MYfunction6 return varchar2
as
output varchar2(200);
CURSOR C1 IS
SELECT Customer_name,Street,City,State,Zip1
FROM CUSTOMER;
begin
for p in c1
loop
output := output || ' ( '
||p.Customer_name|| ' ' ||p.Street|| ' '||p.City ||' '||P.state||'
'||p.Zip1||')';
END LOOP;
return output;
end;
/
select MYfunction6 from dual;


Create a FUNCTION that will print out an address label for the TAL Distributors database using the Customer table. You c...
1. Using a function, display the customer who has the highest credit limit. Display the customer number, customer name, and credit limit. Insert your snip of the query and resultset together here: 2. How many customers have the same credit limit? Display the count of customers by credit limit. Display the count as ‘Number of Customers’ and credit limit as ‘Credit Limit’. Insert your snip of the query and resultset together here: 3. What is the average quoted price, maximum...