Case Study: Heights |
H-6a |
| SQL*Plus: Table | |
| 1. By entering commands into the buffer | (Refer to Buffer & working commands) |
| create table Heights ( FullName varchar2 (30) , Height number, constraint pkFullName primary key(FullName) ); |
|
| desc Heights; |
|
| insert into Heights (FullName, Height) values ('Chrys Lyon', 122); insert into Heights (FullName, Height) values ('Ellee Fant', 192); |
|
| SELECT * FROM Heights; |
|
| 2. Creating a batch file | |
| REM use START <filename> in
SQL*Plus to run this batch file DROP TABLE Heights; create table Heights ( FullName varchar2 (30) , Height number, constraint pkFullName primary key(FullName) ); desc Heights; -- Column names recommended for Insert as table may change in future. -- You can use two dashes instead of REM insert into Heights (FullName, Height) values ('Chrys Lyon', 122); insert into Heights (FullName, Height) values ('Ellee Fant', 192); select * from Heights |
|
[Rev 14/05/99] 25/3/98 © 1999 V/2-Com (Verhaart), P O Box 8415, Havelock North, New Zealand.