The document describes creating a hospital database with 4 tables: patient, doctor, attend, and admitted. It includes the code to create each table with the appropriate fields, as well as code examples to insert values into each table and retrieve data from each table.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
377 views2 pages
Hospital Database: Create The Table Patient
The document describes creating a hospital database with 4 tables: patient, doctor, attend, and admitted. It includes the code to create each table with the appropriate fields, as well as code examples to insert values into each table and retrieve data from each table.
SQL> create table admitted (p_id varchar2(20), d_o_a date); Insert The Values Into Patient Table SQL> insert into patient values (‘&p_id’,’&p_name’,&age,’&p_add’); Insert The Values Into Doctor Table
SQL> insert into doctor values
(‘&d_id’,’&d_name’,’&d_add’);
Insert The Values Into Attend Table
SQL> insert into attend values (‘&d_id’,’&p_id’); Insert The Values Into Admitted Table SQL> insert into attend values (’&p_id’,&d_o_a); Show The details Of Patient Table SQL> select * from patient; Show The details Of Doctor Table SQL> select * from patient; Show The details Of Attend Table SQL> select * from attend; Show The details Of Admitted Table SQL> select * from admitted;