Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Train Reservation
create table TRAINS( TRAIN_NUMBER integer primary key, NAME varchar(50) unique, SOURCE varchar(50), DESTINATION varchar(50), GEN_FAIR integer, AC_FAIR integer, WEEKDAYS_AVAILABLE varchar(10) ); create table TRAIN_STATUS( TRAIN_NUMBER integer, DATE Date Not Null, AC_SEAT integer, GEN_SEAT integer, foreign key(Train_Number) references TRAINS(TRAIN_NUMBER) on delete cascade); Create table PASSENGER ( AADHAR_NO integer unique, NAME varchar(20), AGE integer, SEX char(20), ADDRESS varchar(50), BOOKING_STATUS char(30), SEAT_CATEGORY varchar(10) ); Create table BOOKING ( PASSENGER_AADHAR_NO integer unique, TRAIN_NUMBER integer, foreign key(TRAIN_NUMBER) references TRAINS(TRAIN_NUMBER), BOOKING_DATE date, SEAT_TYPE varchar(20) );
run
|
edit
|
history
|
help
0
Task1
practice sql_12AUG_Upddated
test
jueves
DeletorWall
deepu
Chris
SUPPLIER
self join
NOT NULL field from SELECT INTO