Answered step by step
Verified Expert Solution
Question
1 Approved Answer
MY SQL PLEASE For this lab, complete the following tasks and upload screen shots of your code and the results. 1. Create a stored procedure
MY SQL PLEASE
For this lab, complete the following tasks and upload screen shots of your code and the results. 1. Create a stored procedure that takes a city name for input (IN) and returns the number of languages spoken there as output (OUT). - Test this stored procedure with two cities (such as Canada and France). 2. Create a stored procedure that will take a city name as input (IN) and return either "Big", "Medium", or "Small". - Return "Big" if the city has more than 5,000,000 people. - Return "Small" if the city has less than 100,000 people. - Otherwise, return "Medium. - Test your procedure with New York, Cleveland, and Boulder. 3. Convert the procedure from part 2 into a stored function. - In this case, you will pass in the city population. - You will return the city size level (small, medium, or large) - To test this, display the name of all of the cities from New York along with their respective sizes (big, medium, or small). world Tables - - Columns - ID - Name - CountryCode - District - Population - Indexes Foreign Keys - Triggers country Columns - Name - Continent - Region - SurfaceArea - IndepYear - Population - LifeExpectancy - GNP - GNPOld - LocalName - GovernmentForm - HeadofState - Capital - Code2 Indexes Foreign Keys Triggers countrylanguage Columns - CountryCode - Language - IsOfficial - Percentage Indexes Foreign Keys Triggers Views Stored Procedures Functions Administration Schemas For this lab, complete the following tasks and upload screen shots of your code and the results. 1. Create a stored procedure that takes a city name for input (IN) and returns the number of languages spoken there as output (OUT). - Test this stored procedure with two cities (such as Canada and France). 2. Create a stored procedure that will take a city name as input (IN) and return either "Big", "Medium", or "Small". - Return "Big" if the city has more than 5,000,000 people. - Return "Small" if the city has less than 100,000 people. - Otherwise, return "Medium. - Test your procedure with New York, Cleveland, and Boulder. 3. Convert the procedure from part 2 into a stored function. - In this case, you will pass in the city population. - You will return the city size level (small, medium, or large) - To test this, display the name of all of the cities from New York along with their respective sizes (big, medium, or small). world Tables - - Columns - ID - Name - CountryCode - District - Population - Indexes Foreign Keys - Triggers country Columns - Name - Continent - Region - SurfaceArea - IndepYear - Population - LifeExpectancy - GNP - GNPOld - LocalName - GovernmentForm - HeadofState - Capital - Code2 Indexes Foreign Keys Triggers countrylanguage Columns - CountryCode - Language - IsOfficial - Percentage Indexes Foreign Keys Triggers Views Stored Procedures Functions Administration Schemas
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started