Question
Using the Baseball Sample database from here https://www.sqlskills.com/sql-server-resources/sql-server-demos/ Code an INSERT INTO statement with proper data values that would successfully add a record to the
Using the Baseball Sample database from here https://www.sqlskills.com/sql-server-resources/sql-server-demos/
Code an INSERT INTO statement with proper data values that would successfully add a record to the table. INSERT INTO players (lahmanID, playerID, managerID, hofID, nameFirst, nameLast, weight, height, bats, college). Paste your statement here.
Select the record you just inserted into the players table and attach a screenshot here.
Code a SQL Statement to delete the record from the schools table with the schoolName Adelphi University. Paste your statement here.
Code a SQL Statement to update lahmanID 10 in the players table to have the birthCity Cincinnati. Paste your statement here
Select the record you just updated and attach a screenshot of your results here.
Code a View that displays the school’s name, city, first and last name of each of their players. Paste your CREATE VIEW statement here.
Code a View that displays the number of players for each team by year. Be sure to display team name in the results. Paster your CREATE VIEW statement here.
Code a stored procedure named BestAtBat[YourLastName] that will accept the parameter for playerID and return the year on the message tab for the player’s highest atbat value (AB). Paste your Stored Procedure code here.
Execute the BestAtBat stored procedure you just created and include a screenshot of the execution statement and the result listed on the message tab.
Code a stored procedure named PlayerCount[YourLastName] that returns the row count in the results tab for the number of players for a school. Use schoolID as an input parameter to retrieve these results.
Execute the PlayerCount stored procedure you just created and include a screenshot of the execution statement and the result listed on the results tab.
Step by Step Solution
3.55 Rating (148 Votes )
There are 3 Steps involved in it
Step: 1
I can provide you with the SQL statements and code snippets you requested but I cant create screensh...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