Create a stored procedure that does an insert statement in


Q.1.

Write sql statements to do the following:

Create a stored procedure that does an insert statement in the Customers table. List all the columns. Here are the values 1000000107', 'Bruins', 'Bruin Way 1', 'Lou feliezeau', 'PA', '94005', 'USA', 'Joe Bruin', '[email protected]');

Q.2.

Write sql statement to do the following:

Create a stored procedure that deletes a record from the Ccustomers table by cust_id. Delete previous cust_id record added: 1000000107

Q.3.

Write sql statements to do the following:

Create a stored procedure that updates a record from the Customers table by CustomerID. Update column cust_name and replace with John Wooden. Use cust_id 1000000002 in Customers table.

Note: If cust_id 1000000002 does not exist use another cust_id

Q.4.

Write a sql statements to do the following: 

Create a stored procedure named usp_updateCustomer2 that updates a record from the Customers table by passing in the cust_id using a single parameter. Add parameter @CustomerID as datatype Integer. Update column cust_state and set to 'CA'. Use cust_id 1000000003

Note: If cust_id 1000000003 does not exist use another cust_id

Q.5.

Write a sql statements to do the following:

Create a stored procedure named usp_deleteCustomer that deletes a record from the Customers table by passing in the cust_id using a single parameter. Add parameter @CustomerID as data type Integer. Delete record cust_id 1000000007 from Customers table.

Note: If you get error deleting cust_id 1000000007 then just paste your code. The error is caused becuase you deleted this record in previous question.

Solution Preview :

Prepared by a verified Expert
Macroeconomics: Create a stored procedure that does an insert statement in
Reference No:- TGS01674376

Now Priced at $25 (50% Discount)

Recommended (94%)

Rated (4.6/5)