Content
Using DML we fill information in our tables, database. To do this, we use the keyword INSERT. We change the values in tables with the keyword UPDATE. We delete data with keyword DELETE. Here we have filled our entire data base or rather all of our table.
insert into Address_emp values ('2536', 'noshpa','Karaganda dom13',2356632,'k.n@gmail.com'); insert into Address_emp values ('1563', 'mentol','Aktau dom45',2554565,'aktau@gmail.com'); insert into Address_emp values ('7526', 'spazmalgon','Atyrau dom15',123695,'a.s@gmail.com'); update Address_emp set name = 'noshpa' where name = 'beseptol'; delete from Address_emp where emp_id = '2536';
insert into Medications values ('002', 'analgin','ot boli golovy','Astana - Karaganda'); insert into Medications values ('003', 'citramon','ot boli golovy','Astana'); insert into Medications values ('004', 'furazalidon','ot boli zhivota','Almaty'); update Medications set name_drug = 'analgin' where name_drug = 'asperin'; delete from Medications where med_id = '0002';
insert into Parish values ('0002', '2014-02-2','2','Astana','10000'); insert into Parish values ('0003', '2014-01-1','2','Taraz','5000'); insert into Parish values ('0004', '2014-03-11','2','Semei','1000'); update Parish set quantity = '2' where quantity = '5'; delete from Parish where med_id = '0006';
insert into Flow values ('0002', '2014-02-2','2','10000'); insert into Flow values ('0003', '2014-01-1','2','5000'); insert into Flow values ('0004', '2014-03-11','2','1000'); update Flow set quantity = '2' where quantity = '5'; delete from Flow where med_id = '0006';
insert into Manufacturers values ('0002', 'aevit','Astana'); insert into Manufacturers values ('0003', 'almagel','Semei'); insert into Manufacturers values ('0004', 'citramon','Taraz'); update Manufacturers set name = 'aevit' where name = 'asperin'; delete from Manufacturers where med_id = '0002'; insert into Orders values ('1122', 'aevit',1,'Astana'); insert into Orders values ('1223', 'almagel',2,'Semei'); insert into Orders values ('1324', 'citramon',3,'Taraz'); update Orders set name = 'aevit' where name = 'asperin'; delete from Orders where ord_id = '1122';
insert into Suppliers values ('0002', 'aevit','Astana'); insert into Suppliers values ('0003', 'almagel','Semei'); insert into Suppliers values ('0004', 'citramon','Taraz'); update Suppliers set name = 'aevit' where name = 'asperin'; delete from Suppliers where med_id = '0002';
insert into Ingredients values ('1022', 'aevit','Astana'); insert into Ingredients values ('1023', 'almagel','Semei'); insert into Ingredients values ('1024', 'citramon','Taraz'); update Ingredients set name = 'aevit' where name = 'asperin'; delete from Ingredients where ord_id = '1022';
|