code123

DEEPASHREE_Ramesh2207 · updated September 17, 2021 · SQL
CREATE TABLE Customer_Details (
  Customer_ID char(5) PRIMARY KEY check(Customer_ID like 'C%'),Customer_Name varchar(40) ,Customer_addr varchar(50)
);
INSERT INTO Customer_Details VALUES('C001','SURABHI AGARWAL','MANIKCHAND GALERIA'),
('C002','JOHN MATHEW','KOTHRUDE'),
('C003','RICHA SHARMA','MG ROAD'),
('C004','SARIKA SAXENA','CAMP'),
('C005','AKSHAY TIWARI','KHAR'),
('C006','SUMIT SAXENA','KHAR'),
('C007','RASHMI JAIN','CAMP PUNE');

select * from Customer_Details;


  


INSERT INTO Customer_Details VALUES('001','SURABHI AGARWAL','MANIKCHAND GALERIA'),
('C002','JOHN MATHEW','KOTHRUDE'),
('C003','RICHA SHARMA','MG ROAD'),
('C004','SARIKA SAXENA','CAMP'),
('C005','AKSHAY TIWARI','KHAR'),
('C006','SUMIT SAXENA','KHAR'),
('C007','RASHMI JAIN','CAMP PUNE');

select * from Customer_Details;

create table Account_Details(
         Account_ID char(5) primary key not null, 
         Customer_ID char(5) ,
         Branch_ID char(5) ,
         Account_Type char(1),
         Deposit_Amount int,
         Acc_opening_date date
);
         
insert into Account_Details values('A010','C001','B101','S','30000',2021-05-10),
('A020','C002','B102','S','23000',2021-05-19),('A030','C003','B103','C','2000',2021-05-25),
('A040','C004','B104','C','15000',2021-05-30),('A050','C005','B105','S','13000',2021-06-05),
('A060','C006','B106','S','9500',2021-06-10),('A070','C007','B107','C','4000',2021-06-15),
('A080','C008','B107','S','28000',2021-06-21),('A090','C009','B109','S','12000',2021-06-27),
('A100','C010','B110','S','45000',2021-07-08);

select * from Account_Details;

  

           

Comments

Please sign up or log in to contribute to the discussion.