Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- create or replace procedure newpatient
- (ptid patient.pt_id%type,
- ptlname patient.pt_lname%type,
- ptfname patient.pt_fname%type,
- dob patient.ptdob%type,
- docid patient.doc_id%type)
- as
- begin
- insert into patient (pt_id, pt_lname, pt_fname, ptdob, doc_id)
- values (ptid, ptlname, ptfname, dob, docid);
- end newpatient;
- /
- accept ptid prompt 'Enter patient id: '
- accept ptlname prompt 'Enter patient last name: '
- accept ptfname prompt 'Enter patient first name: '
- accept dob prompt 'Enter patient date of birth: '
- accept docid prompt 'Enter patient's doctor id: '
- begin
- newpatient ('&ptid', '&ptlname', '&ptfname', '&dob',
- '&docid');
- dbms_output.put_line('The data is successfully entered');
- end;
- /
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement