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
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 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.
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill