Create a procedure named 'findConnection' which which has contactNumber as an input parameter with varchar as its data type and and connection as an output parameter with varchar as its datatype. This procedure should find the name of the connection for the contactNumber passed as parameter.Hints:Procedure name :findConnectionParameters : contactNumber(varchar),connection(varchar)SubmitSaveExecutePrevious Submission
Question
Create a procedure named 'findConnection' which which has contactNumber as an input parameter with varchar as its data type and and connection as an output parameter with varchar as its datatype. This procedure should find the name of the connection for the contactNumber passed as parameter.Hints:Procedure name :findConnectionParameters : contactNumber(varchar),connection(varchar)SubmitSaveExecutePrevious Submission
Solution
It seems like you're asking for a SQL stored procedure. Here's a basic example of how you might structure this:
CREATE PROCEDURE findConnection
@contactNumber VARCHAR(50),
@connection VARCHAR(50) OUTPUT
AS
BEGIN
SELECT @connection = connection
FROM YourTable
WHERE contactNumber = @contactNumber;
END;
Please replace "YourTable" with the actual name of your table. This procedure will find the 'connection' from a table where the 'contactNumber' matches the one you provide. The result is then stored in the output parameter '@connection'.
Similar Questions
Create a procedure named 'insertConnection' which has connection_name as an input parameter with varchar2 as its datatype. This procedure should take the count of the existing table records(electricity_connection_type) and add 1 with that to generate the new electricity_connection_type id.The newly generated id along with the connection_name should be inserted into the electricity_connection_type table
Write a PL/SQL simple procedure named display_custommessage with 2 parameters. The first input parameter is name of type varchar. The second output parameter is custmsg of type varchar. This procedure will set the output parameter message with ‘Hi <name>, You’re learning PL/SQL’.Use the below skeleton:Procedure name: display_custommessageInput parameter: name of type varcharOutput parameter: custmsg of type varcharNote:Do not change the procedure nameDo not change the argument count and orderDo not change the output text.Instructions:1. Create the procedure successfully2. Once the procedure is created, check the functionality of the procedure using different anonymous block call.3. DO NOT submit the anonymous block. Submit only the CREATE PROCEDURE query.Sample Input and Output:If the input parameter is 'Alice', then the sample output will be below:
QuerySB - Display custom messageWrite a PL/SQL simple procedure named display_custommessage with 2 parameters. The first input parameter is name of type varchar. The second output parameter is custmsg of type varchar. This procedure will set the output parameter message with ‘Hi <name>, You’re learning PL/SQL’.Use the below skeleton:Procedure name: display_custommessageInput parameter: name of type varcharOutput parameter: custmsg of type varcharNote:Do not change the procedure nameDo not change the argument count and orderDo not change the output text.Instructions:1. Create the procedure successfully2. Once the procedure is created, check the functionality of the procedure using different anonymous block call.3. DO NOT submit the anonymous block. Submit only the CREATE PROCEDURE query.Sample Input and Output:If the input parameter is 'Alice', then the sample output will be below:
Create a procedure named 'insertRoute' which has route_name as an input parameter with varchar as its datatype. This procedure should take the count of the existing table records(route table) and add 1 with that to generate the new route id.The newly generated id along with the route_name should be inserted into the route table.Hints:Procedure name : insertRouteParameters : route_name is type of varchar
Create a procedure named 'findAmount' which takes 2 input parameters namely, personName is type of varchar2, entryTime is type of timestamp and 1 output parameter namely, travelAmount double precision. This procedure should find the amount for the travel_payment made by the person on time whose personName and entryTime is passed as an input paramter.Hints:Procedure name : findAmountParameters : personName(varchar2),entryTime(timestamp),travelAmount(double precision)Submit
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.