Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Create table VEHICLE
- (
- VINNumber Number(9) PRIMARY KEY,
- Make Varchar2(10) NOT NULL,
- ModelKind Varchar2(10) NOT NULL,
- YearMade DATE NOT NULL,
- RentalCategoryID Number(6) NOT NULL,
- Color Varchar2(10) NOT NULL,
- PlateNumber Varchar2(10) NOT NULL,
- Mileage Number(10) NOT NULL,
- TransmisionType Varchar2(10) NOT NULL,
- SeatCapacity Number(1) NOT NULL,
- DailyRentalCost Dec(8,2) NOT NULL,
- VehicleStatusID Number(6) NOT NULL,
- AssignedAgencyID Number(6) NOT NULL,
- CurrentAgencyID Number(6) NOT NULL,
- VehicleType Varchar2(10) NOT NULL,
- Price Number(10) NOT NULL,
- MPH Number(3) NOT NULL,
- HORSEPOWER Number(4) NOT NULL,
- MPG Number(2) NOT NULL
- );
- SELECT *
- FROM Vehicle
- WHERE MPG >= 58;
- create or replace procedure simple_procedure
- as
- cursor c1 as SELECT * from Vehicle WHERE MPG >= 58;
- begin
- for rec in c1
- loop
- --something you want like rec.[col_name];
- end loop;
- end;
Add Comment
Please, Sign In to add comment