logo

SQL Queries for Product, Customer, and Order Tables

   

Added on  2019-09-30

12 Pages1173 Words184 Views
 | 
 | 
 | 
ASSIGNMENT QUESTION / SOALAN TUGASAN1.Create a Database CBDB4103, or any suitable name.2.Create Product, Customer and Order tables. Product Tablecreate table Product(ProductId int,ProductName varchar2(30),Price decimal(10,2),Category varchar2(30));
SQL Queries for Product, Customer, and Order Tables_1

Customer Tablecreate table Customer(CustomerId int,CustomerName varchar2(30),CustomerAddress varchar2(30),CustomerContact number(15));Orders Tablecreate table Orders(OrderId int,Date1 varchar2(30),Total_Amount decimal(10,2),ProductId int,CustomerId int);
SQL Queries for Product, Customer, and Order Tables_2

3.Insert the above given data into the created tables. Product Tableinsert into Product values(1,'Router',945.00,'Network');insert into Product values(2,'Laptop',3400.00,'Hardware');insert into Product values(3,'Microsoft Software',450.00,'Software');insert into Product values(4,'Switch',567.00,'Network');
SQL Queries for Product, Customer, and Order Tables_3

Customer Tableinsert into Customer values(101,'Halinda','Shah Alam',0192345333);insert into Customer values(102,'Rafeq','Subang Jaya',0198089888);insert into Customer values(103,'Jason','Kepong',0186789543);insert into Customer values(104,'Lee Kim Siew','Shah Alam',0145567865);insert into Customer values(105,'Joshua','Shah Alam',0132244567);insert into Customer values(106,'Zarina','Subang Jaya',0145567783);insert into Customer values(107,'Amin','Kepong',0186675433);
SQL Queries for Product, Customer, and Order Tables_4

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents