Professional Documents
Culture Documents
Department of HIT
SQL statements and syntax
Prepared by Mr. Miftah Temam (Health Informatics)
1
June 2022 GC.
Mizan Aman College of Health Science
Department of HIT
SQL statements and syntax
Prepared by Mr. Miftah Temam (Health Informatics)
Example:
insert into doctor (ID, First_Name,
Last_Name)values 'Doc1','Abebe','Feleke');
3
June 2022 GC.
Mizan Aman College of Health Science
Department of HIT
SQL statements and syntax
Prepared by Mr. Miftah Temam (Health Informatics)
Example:
DELETE
delete from patient where MRN=908765;
(deleting rows)
Deleting all records
DELETE FROM table_name;
Example:
delete from patient;
SELECT OR
Example:
select * from CUSTOMER;
4
June 2022 GC.
Mizan Aman College of Health Science
Department of HIT
SQL statements and syntax
Prepared by Mr. Miftah Temam (Health Informatics)
5
June 2022 GC.
Mizan Aman College of Health Science
Department of HIT
SQL statements and syntax
Prepared by Mr. Miftah Temam (Health Informatics)
MINIMUM Examples:
select min (Age) from patient ;
MAXIMUM
select max (Age) from patient ;
AVERAGE
select avg(age) from patient;
COUNT select count(First_Name) from patient;
SUM select sum(Salary) from Doctor;
6
June 2022 GC.