Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

Question 1  (Marks 10)                                                                                                                          

Write SQL command to create the PRODUCT table having the following columns and their constraints. You are required to choose the appropriate data type for each column by your own.

 

Column Name

Data Type

Constraint

Invoice_No

-

-

Product_ID

-

-

Product_price

-

NOT NULL

Product_brand

-

NOT NULL

Product_size

-

DEFAULT 0

Product_color

-

NOT NULL

 

Question 2  (Marks 10)

Write the following SQL commands for the PRODUCT table created in question 1.

 

1.      Add the primary key constraint on Invoice_No & Product_ID columns using ALTER command.

 

2.      Add the foreign key constraint on Invoice_ID column using ALTER command.

 

Note: Invoice_No is a primary key column in Invoice table.

 

 

 

Note: Deadline for assignment submission is 10 December 2021.

Wish you best of Luck!

 

Views: 94

Attachments:

Replies to This Discussion

Stay touched with this discussion & Participate in this discussion to solve the assignment, Solution idea will be uploaded as soon as possible in replies here before the due date.

RSS

© 2022   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service