0% found this document useful (0 votes)
25 views2 pages

Tables

The document outlines SQL commands for creating and populating three tables: Sailors, Reserves, and Boats. The Sailors table includes details about sailors such as their ID, name, rating, and age, while the Reserves table records boat reservations by sailors on specific dates. The Boats table contains information about different boats, including their ID, name, and color.

Uploaded by

bijjahimanshu05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views2 pages

Tables

The document outlines SQL commands for creating and populating three tables: Sailors, Reserves, and Boats. The Sailors table includes details about sailors such as their ID, name, rating, and age, while the Reserves table records boat reservations by sailors on specific dates. The Boats table contains information about different boats, including their ID, name, and color.

Uploaded by

bijjahimanshu05
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Sailors Table Reserves Table

Boats Table

1. create table Sailors(sid number(2),sname varchar2(20),rating


number(2),age number(3,1))
2. insert into Sailors values(22,'Dustin',7,45.0);
insert into Sailors values(29,'Brutus',1,33.0);
insert into Sailors values(31,'Lubber',8,55.5);
insert into Sailors values(32,'Andy',8,25.5);
insert into Sailors values(58,'Rusty',10,35.0);
insert into Sailors values(64,'Horatio',7,35.0);
insert into Sailors values(71,'Zorba',10,16.0);
insert into Sailors values(74,'Horatio',9,35.0);
insert into Sailors values(85,'Art',3,25.5);
insert into Sailors values(95,'Bob',3,63.5);
3. create table Reserves(sid number(2),bid number(3),day date)
4. insert into Reserves values(22,101,'10-Oct-98');
insert into Reserves values(22,102,'10-Oct-98');
insert into Reserves values(22,103,'10-Aug-98');
insert into Reserves values(22,104,'10-Jul-98');
insert into Reserves values(31,102,'11-Oct-98');
insert into Reserves values(31,103,'11-Jun-98');
insert into Reserves values(31,104,'11-Dec-98');
insert into Reserves values(64,101,'09-May-98');
insert into Reserves values(64,102,'09-Aug-98');
insert into Reserves values(74,103,'09-Aug-98');
5. create table Boats(bid number(3),bname varchar2(15),color
varchar2(8))
6. insert into Boats values(101,'Interlake','blue');
insert into Boats values(102,'Interlake','red');
insert into Boats values(103,'Clipper','green');
insert into Boats values(104,'Marine','red');

You might also like