Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
use Lab3;
Create table Supplier
(SupplierID nvarchar(50) not null Primary Key,
Name nvarchar(50),
Address nvarchar(50));
Create table Product
(ProductID nvarchar(50) not null Primary Key,
Name nvarchar(50),
Price_RM decimal(10,2),
QuantityInStock int);
Create table Supplies
(SuppliesID nvarchar(50) not null Primary Key,
SupplierID nvarchar(50) foreign key references Supplier(SupplierID),
ProductID nvarchar(50) foreign key references Product(ProductID),
SuppliedDate Date, QuantitySupplied int);
Insert into Supplier values
('S01','ABC Company', 'Penang'),
('S02','XYZ Company', 'Johor'),
('S03','HJK Company', 'Selangor'),
('S04','PQR Company', 'Selangor');
Insert into Product values
('P01','Keyboard', 103.55, 60),
('P02','Mouse', 30.90, 70),
('P03','Monitor', 200, 80),
('P04','Pendrive', 40.30, 50);
Insert into Supplies values
('001','S01','P01', '11 January 2017', 100),
('002','S01','P02', '22 February 2017', 200),
('003','S01','P03', Null, 300),
('004','S02','P03', '30 April 2017', 400);
--5(a)
Select * From Supplier;
--5(b)
select Name, Price_RM FROM Product;
--6
Select Address from Supplier;
Select Distinct Address from Supplier;
--7(a)
select * from Supplies where SuppliedDate is NULL;
--7(b)
select * from Supplies where SuppliedDate is not NULL;
![]() |
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