Advertisement
Warmachine28

Untitled

Jan 27th, 2022
1,047
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. create table train_details(
  2.     train_no int,
  3.     train_src varchar(255),
  4.     train_dest varchar(255),
  5.     train_arr_time time,
  6.     train_dep_time time,
  7.     train_seat_total_seats int,
  8.     train_seats_booked int,
  9.     train_seats_vacant int
  10. );
  11.  
  12. insert into train_details values(22547,'Kanya Kumari','Jammu','19:20:00','19:30:00',380,80,300);
  13.  
  14. select * from train_details where train_src='Delhi' and train_dest='Varanasi';
  15. select * from train_details where train_src='Kanya Kumari' and train_dest='Jammu';
  16. select train_no,train_src from train_details where train_dest='Delhi';
  17. select * from train_details where train_dest<>'Gaziabad';
  18.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement