Use T-SQL to create two table structures based on the following entities: Table
ID: 3582046 • Letter: U
Question
Use T-SQL to create two table structures based on the following entities:
Table name: Booth
Table name: Machine
Booth_Product
Booth_Price
Machine_Product
Machine_Price
Each table will have the two attributes indicated in the example above. The MACHINE_PRODUCT and BOOTH_PRODUCT will be character data type and the two price fields will be a money data type. Copy and paste the T-SQL table create statements into your assignment submission for this part of the assignment. Preceding your T-SQL create table statement use the following statements:
use cis535;
if object_id('dbo.booth', 'U') is not null
drop table dbo.booth;
…T-SQL create table statement
AND
use cis535;
if object_id('dbo.MACHINE', 'U') is not null
drop table dbo.MACHINE;
…T-SQL create table statement
Question: What is the purpose of the if-drop statements?
What were the scripts used for each statement?
Table name: Booth
Table name: Machine
Booth_Product
Booth_Price
Machine_Product
Machine_Price
Explanation / Answer
CREATE TABLE Booth
(
Booth_Product VARCHAR(255),
Booth_Price Currency
);
CREATE TABLE Machine
(
Machine_Product VARCHAR(255),
Machine_Price Currency
);
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.