0% found this document useful (0 votes)
4 views

CompProject

Uploaded by

jasoncva20
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views

CompProject

Uploaded by

jasoncva20
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

create database RE_Showroom;

use RE_Showroom

create table Bikes(ID varchar(50), SNo int, Model varchar(20), UnitsSold int,
UnitsAvailable int);

insert into Bikes values("RE01019", 01, "Continental GT 650", 25, 50);

insert into Bikes values("RE02021", 02, "Interceptor 650", 30, 40);

insert into Bikes values("RE03023", 03, "Super Meteor 650", 20, 30);

insert into Bikes values("RE04025", 04, "Meteor 350", 20, 40);

insert into Bikes values("RE05027", 05, "Shotgun 650", 15, 20);

alter table Bikes add column Price int;

update Bikes set Price = 373000 where UnitsSold = 15;

update Bikes set Price = 370000 where Model = "Super Meteor 650";

update Bikes set Price = 216000 where Model = "Meteor 350";

update Bikes set Price = 340000 where Model = "Continental GT 650";

update Bikes set Price = 321000 where Model = "Interceptor 650";

create table Accessories(ID varchar(50), SNo int, Equipments varchar(20),


Units_Sold int, Units_Available int, Price int);

insert into Accessories values("AC01", 01, "Mobile Stand", 50, 100, 400);

insert into Accessories values("AC02", 02, "Helmet", 25, 70, 1000);

insert into Accessories values("AC03", 03, "Seat Cushion", 25, 50, 1400);

insert into Accessories values("AC04", 04, "Gloves", 10, 30, 500);

create table Customers(ID int, Name varchar(100), PhoneNo int, Email varchar(30));

alter table Bikes add column ID varchar(30) first;

create table orders(CustomerID int, CustomerName varchar(50), ModelID varchar(30),


ModelName varchar(50), EquipmentID varchar(50), EquipmentName varchar(50));

You might also like