NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Create database SupplyChain
use SupplyChain

create table Customer(
id int not null Primary Key,
FirstName Varchar(20),
LastName varchar(20),
City varchar(20),
Country varchar(20),
Phone int
)

create table [Order](
id int not null Primary Key,
OrderDate Date,
Customerid int,
TotalAmount Float
)

Create table OrderItem(
id int not null Primary Key,
OrderId int,
ProductId int,
UnitPrice float,
Quantity int
)

create Table Product(
id int not null Primary Key,
ProductName varchar(30),
Supplierid int,
UnitPrice float,
Package date,
IsDisContinued bit
)

create table supplier(
id int not null Primary Key,
CompanyName Varchar(50),
ContactName Varchar(50),
City Varchar(50),
Country Varchar(20),
phone int,
Fax int
)

alter table [Order]
add constraint FK
Foreign Key (CustomerID) references Customer(id)

alter table OrderItem
add constraint Fk1
Foreign Key (OrderID) references [Order](id)

alter table OrderItem
add constraint Fk2
Foreign Key (ProductID) references Product(id)

alter table Product
add constraint Fk3
Foreign Key (Supplierid) references Supplier(id)

insert into customer
values(12123,'Radhey','Yadav','Kanpur','India',3456898),
(12124,'Rajat','Singh','Lucknow','India',568987654),
(12125,'Sam','Billings','Sydney','Australia',45689876),
(12126,'Joe','Root','London','UK',8987654),
(12127,'Abhay','Patel','Orai','India',6898765)

insert into supplier
values(66123,'RS Pvt Ltd','Ram Singh','Indore','India',98567,84456),
(66124,'A Pvt Ltd','Andrew','California','USA',91233,6798),
(66125,'J Pvt Ltd','John','New York','USA',998745,4456),
(66126,'R Pvt Ltd','Raju','Pune','India',985673,56),
(66127,'JP Pvt Ltd','JP','Surat','India',98567,84456)

insert into [Order]
values(88233,'2000-12-11',12123,7865),
(88234,'2010-2-11',12124,65),(88235,'2022-12-1',12125,34),
(88236,'2021-3-4',12126,77),(88237,'2022-09-15',12127,17)

insert into Product
values(33123,'TV',66123,40,'2000-12-11',1),(33124,'SmartPhone',66124,50,'2010-2-11',0),
(33125,'Laptop',66125,200,'2021-3-4',1),(33126,'Table',66126,10,'2000-12-11',1),
(33127,'Lamp',66127,15,'2022-09-15',1)

insert into OrderItem
values(1,88233,33123,40,50),(2,88234,33124,50,30),(3,88235,33125,200,7),
(4,88236,33126,10,1231),(5,88237,33127,15,44)

update OrderItem
set Quantity=10
where Quantity=7

delete OrderItem
where id=1
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.