Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Winning Compliance Auditing With Gung Fu Fighting Philosophy

Authors: Phillip Lee

1st Edition

B0CBD8KT6P, 979-8223104414

More Books

Students also viewed these Accounting questions

Question

The core of a TP-coalitional game is convex.

Answered: 1 week ago