CTS 2437 Assignment 9 Fall, 2012For each of the following exercises, copy/paste both your SQL command and a screen shot of the results into a Word document. Please use one page per item. You should obtain the following results. Code used to complete each problem should be contained in the same batch.1. Set two variable values as follows:@minEnrollment = 10 @maxEnrollment = 20Determine the number of courses with enrollments between the values assigned to @minEnrollment and @maxEnrollment. If there are courses with enrollments between thes two values, display a message in the form “There is/are __ class(es) with enrollments between __ and __.” If there are no classes within the defined range, display a message in the form “There are no classes with an enrollment between __ and __ students.”2. Select the courses for which Sally Jones has the most students and the least students. Assign these numbers to variables. Display results in the form:The largest class taught by Sally Jones has an enrollment of _____. The smallest class taught by Sally Jones has an enrollment of ____. There is a difference of _____ between her smallest and largest class.3. Create a table variable that contains a first name, last name, and reference number. Write statement(s) that will populate the table with the reference number for each course , along with the first and last name of the faculty member who teaches the course. Display contents of the table in the form :[firstname] [lastname] [ref_number]4. Repeat (3) using a local temporary table.5. Createa global temporary table that contains each faculty member’s first name, last name, campus, and a new ID number consisting of 5 digits in the range 10000-99999. Each faculty number should be entered into the table only one time. Display contents of your table.6. Write a dynamic SQL statement that, when executed, will display faculty first names, last names, course reference numbers, and course enrollment for each course. The table names should be assigned as variables

quote:Originally posted by visakh16

You need to explain us what the problem is and what your attempts were. Without you trying out first we wont help solving assignments!