Write 15 separate SQL DDL or update DML queries, named Query36 through Query50. Each query will contain a SQL DDL or update DML statement that is your solution for the translation of a plain English DDL or DML request. Each query is worth one point. The 15 plain English queries are:
- Create a table, called Dealership2, which has the same column names and data types as the Dealership Do not include a primary key constraint. Do not include an input mask for the dzip column.
- Create a primary index, called PrimaryKey, on the dcode column in Dealership2 Use CREATE INDEX syntax.
- Create a table, called Vehicle2, which has the same column names and data types as the Vehicle Do not include a primary key constraint. Do include a foreign key constraint to Dealership2 and name it ForeignKey_to_Dealership2.
- Add a primary key constraint, called PrimaryKey, on the vvin column in Vehicle2.
Use ALTER TABLE syntax.
- Create an index, called FK_to_Dealership2, on the foreign key column in Vehicle2.
Use CREATE INDEX syntax.
- Using INSERT INTOSELECT syntax, insert all the rows from Dealership into Dealership2.
- Using INSERT INTO VALUES syntax, insert into the Dealership2 table:
193, Asg 5 Test Dealership, 10 Main St, Albany, NY, 12203
- Using INSERT INTO VALUES syntax, insert into the Vehicle2 table:
A1B2C3WXYZ0123456, 193, 2015, SUBA, sedan, blue, 2310, gas, 6
- Change vweight to 3,210 in the row you inserted in Query43, identifying this row by using its primary key value.
- For all Dealership2 rows with a dcity value of Albany, change dstate to GA and dzip to null.
- Erase the single row of data inserted in Query43. Use the primary key value to pick the right row.
- Remove the foreign key constraint in Vehicle2 which was created by Query38.
- Drop the Vehicle2
- Erase all the data in Dealership2.
- Drop the Dealership2

![[Solved] ICSI410 Assignment 5](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] ICSI410 Homework 1](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.