Helpers

Reset DB Tables

--Reset Database Tables

delete from crew;
delete from flightstaff;
delete from baggage;
delete from passengerlist;
delete from groundstaff;
delete from staff;
delete from city;
delete from flight;
delete from rank;
delete from passport;
delete from country;
delete from plane;
delete from planetype;
delete from gate;
delete from airport;
delete from airline;
delete from department;
delete from salarygrade;
delete from person;

Insert into person select * from airportbase.person;
Insert into salarygrade select * from airportbase.salarygrade;
Insert into department select * from airportbase.department;
Insert into airline select * from airportbase.airline;
Insert into planetype select * from airportbase.planetype;
Insert into plane select * from airportbase.plane;
Insert into airport select * from airportbase.airport;
Insert into gate select * from airportbase.gate;
Insert into country select * from airportbase.country;
Insert into passport select * from airportbase.passport;
Insert into rank select * from airportbase.rank;
Insert into flight select * from airportbase.flight;
Insert into city select * from airportbase.city;
Insert into staff select * from airportbase.staff;
Insert into groundstaff select * from airportbase.groundstaff;
Insert into passengerlist select * from airportbase.passengerlist;
Insert into baggage select * from airportbase.baggage;
Insert into flightstaff select * from airportbase.flightstaff;
Insert into crew select * from airportbase.crew;

select * from crew;
select * from flightstaff;
select * from baggage;
select * from passengerlist;
select * from groundstaff;
select * from staff;
select * from city;
select * from flight;
select * from rank;
select * from passport;
select * from country;
select * from gate;
select * from airport;
select * from plane;
select * from planetype;
select * from airline;
select * from department;
select * from salarygrade;
select * from person;