Write a script that includes two sql statements code

Assignment Help Database Management System
Reference no: EM131061999

Lab Assignment

Excercise

1. Write a script that includes two SQL statements coded as a transaction to delete the row with a customer ID of 8 from the Customers table. To do this, you must first delete all addresses for that customer from the Addresses table.

If these statements execute successfully, commit the changes. Otherwise, roll back the changes.

2. Write a script that includes these statements coded as a transaction:

INSERT Orders

VALUES (3, GETDATE(), '10.00', '0.00', NULL, 4,

'American Express', '378282246310005', '04/2013', 4);

SET @OrderID = @@IDENTITY;

INSERT OrderItems

VALUES (@OrderID, 6, '415.00', '161.85', 1);

INSERT OrderItems

VALUES (@OrderID, 1, '699.00', '209.70', 1);

Here, the @@IDENTITY variable is used to get the order ID value that's automatically generated when the first INSERT statement inserts an order.

If these statements execute successfully, commit the changes. Otherwise, roll back the changes.

Attachment:- CreateMyGuitarShop.rar

Reference no: EM131061999

Questions Cloud

Determine the components of the corresponding reaction at b : Prob. 8.46 The machine part ABC is supported by a frictionless hinge at B and a 10° wedge at C. Knowing that the coefficient of static friction is 0.20 at both surfaces of the wedge, determine (a) the force P required to move the wedge to the left..
Faced with rising costs-particularly employment costs : View the clip below, in which one person believes they are partners and the other believes it is an employer / employee  relationship. Agents may bind the principal in a number of ways. When you are reviewing the video, consider whether the intent..
Percentage of households : Fifty million of 94 million households watched the last episode of a popular television show. What percentage of households were not watching the show? Approximately ? % of households were not watching the last episode of the show.
Determine the smallest force p that should be applied : Knowing that the coefficient of static friction is 0.30 at all surfaces of contact, determine the smallest force P that should be applied as shown to one of the wedges.
Write a script that includes two sql statements code : Write a script that includes two SQL statements coded as a transaction to delete the row with a customer ID of 8 from the Customers table. To do this, you must first delete all addresses for that customer from the Addresses table.
Coefficient between the number of automatic weapons : The data below show the number of registered automatic weapons, in thousands, and the murder rate, in murders per 100,000, for eight randomly selected states. a. Determine the correlation coefficient between the number of automatic weapons and the ..
Which motion occurs and what that motion is : which motion occurs, and what that motion is
Discuss the process and outcomes of the job portal project : Write a professional reflection essay in which you discuss the process and outcomes of this project, as well as how your coursework culminated in the capstone project.
Research proposal on self driving car : Prepare a Research proposal on given Topic. My topic is self driving car. What method wills you use to analyse your readings? How will you interpret the analysis to make your conclusions

Reviews

Write a Review

Database Management System Questions & Answers

  Creating a database and then adding to it a foreign key

creating a database and then adding to it a foreign key constraint

  What business assumptions were made to define this table

Use the Access Help system to learn how to resize datasheet columns to fit the data, and then resize all columns in the datasheet for the Payment table.

  Write a short description of odbc, jdbc or java services

Explain what middleware is and what it does. Why would MIS managers be particularly interested in such software?

  Describe the basic features of the rdb model

Describe the basic features of the RDB model and discuss their importance to the end-user and the designer.

  Do explain the process of normalization

Explain the context in which Normalization is used?

  Explain class diagram

Explain Class diagram. Outline the main steps in developing a class diagram for a Use Case(UC).

  Prepare a document containing the logical design

State any assumptions you make about the problem, especially those required for correct interpretation of your diagram.

  Data analysis and definition

What is the business implications that can be drawn from the process of building and comparing these models, and has this practice helped resolve the business issue? Why or why not?

  Implementation of virtual private databases

Prepare a 3-4 pages of technical document in MS Word Format on usage, utilization, and implementation of Virtual Private Databases (VPD) for the cases of your choice.Explain each situation in details, and describe how it works?

  Assignment 5 logical design part ii problem your e-r model

assignment 5 logical design part ii problem your e-r model from a prior week was a success assignment 2 - logical

  How important is the documentation of database environment

How important is the documentation of the database environment? Moreover, how do you think the advent of cloud computing has affected electronic data interchange (EDI)

  Write a program that will open a blastn

Write a program that will open a BLASTN nucleotide to nucleotide search output file, parse out specific information, and produce formatted output that will be written to STDOUT

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd