Notes
Notes - notes.io |
use prac1710
create table Customer
(
Id int Not Null Primary Key,
FirstName nvarchar(30),
LastName nvarchar(30),
City nvarchar(30),
Country nvarchar(30),
Phone nvarchar(15)
)
create table [Order]
(
Id int Not Null Primary Key,
OrderDate nvarchar(20),
Customerid int FOREIGN KEY references Customer(Id),
TotalAmount float
)
create table Supplier
(
Id int Not Null Primary Key,
CompanyName nvarchar(30),
ContactName nvarchar(30),
City nvarchar(30),
Country nvarchar(30),
Phone nvarchar(15),
Fax nvarchar(30)
)
create table Product
(
Id int Not Null Primary Key,
ProductName nvarchar(50),
Supplierid int FOREIGN KEY references Supplier(Id),
UnitPrice float,
Package nvarchar(20),
isDiscontinued tinyint
)
create table OrderItem
(
Id int Not Null Primary Key,
Orderid int FOREIGN KEY references [Order](Id),
Productid int FOREIGN KEY references Product(Id),
UnitPrice float,
Quantity int
)
insert into OrderItem(Id,Orderid,Productid,UnitPrice,Quantity)
values(1,3,5,50,5),
(2,2,4,35,10),
(3,1,3,20,50),
(4,5,2,100,2),
(5,4,1,75,7)
insert into Product(Id,ProductName,Supplierid,UnitPrice,Package,isDiscontinued)
values(1,'Coffee',1,10,'31/02/2005',0),
(2,'Laptop',5,70000,'19/06/2002',1),
(3,'DairyMilk',2,100,'17/10/2022',0),
(4,'Cold drink',3,20,'09/05/1988',1),
(5,'Mobile Phone',4,30000,'17/03/1997',0)
insert into [Order](Id,OrderDate,Customerid,TotalAmount)
values(1,'15/08/2005',3,5000),
(2,'28/08/2007',1,2000),
(3,'07/05/1998',4,9000),
(4,'18/02/2001',2,1000),
(5,'17/10/2022',5,7000)
insert into Customer(Id,FirstName,LastName,City,Country,Phone)
values(1,'Alaric','Saltzman','Mystic Falls','US','9466790642'),
(2,'Caroline','Forbes','Miami','US','7466790648'),
(3,'Stefan','Salvatore','Coorg','India','7466710642'),
(4,'Damon','Salvatore','Coorg','India','7466720642'),
(5,'Klaus','Mikaelson','Bulgaria','USA','7466790643')
insert into Supplier(Id,CompanyName,ContactName,City,Country,Phone,Fax)
values (1,'Nestle','Landon','Virginia','US','8965736201','237994'),
(2,'Cadbury','Hope','New Orleans','US','8965753620','593944'),
(3,'Coke','Lizzie','Florida','USA','8965736271','537644'),
(4,'Realme','Jossie','Florida','USA','8965733201','585944'),
(5,'Samsung','Ric','Mystic Falls','TVD','8965136201','537932')
select * from Customer
select * from Supplier
select * from [Order]
select * from Product
select * from OrderItem
update Customer
set City='New Orleans'
where City='Bulgaria'
delete from Supplier where id=5
|
Notes.io is a web-based application for 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 12 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