Help!! How to use CONSTRAINT in SQLPlus?
From: Hongbo Zhang <hongbozhang_at_yahoo.com>
Date: Fri, 09 Apr 1999 12:58:18 GMT
Message-ID: <KPmP2.907$0C1.108850_at_carnaval.risq.qc.ca>
Hi,
code_emp | name_emp |
| code_hospital | code_unit | capacity_unit | code_emp |
SELECT HU.code_unit, HU.code_hospital
FROM hospital_unit HU, (SELECT * FROM employee WHERE name_emp='MANON GAUDET') E
WHERE HU.code_emp=E.code_ emp;
I got result: code_hospital=1, code_unit=1 then, I execute:
---
DELETE FROM hospital_unit
WHERE code_hospital=1 AND code_unit=1;
---
Then I re-execute the previous query, I got a message like:
Date: Fri, 09 Apr 1999 12:58:18 GMT
Message-ID: <KPmP2.907$0C1.108850_at_carnaval.risq.qc.ca>
Hi,
I have 2 tables:
employee:
code_emp | name_emp |
hospital_unit:
| code_hospital | code_unit | capacity_unit | code_emp |
In Oracle Sqlplus, I execute first:
SELECT HU.code_unit, HU.code_hospital
FROM hospital_unit HU, (SELECT * FROM employee WHERE name_emp='MANON GAUDET') E
WHERE HU.code_emp=E.code_ emp;
I got result: code_hospital=1, code_unit=1 then, I execute:
---
DELETE FROM hospital_unit
WHERE code_hospital=1 AND code_unit=1;
---
Then I re-execute the previous query, I got a message like:
" no rows selected"
Would you tell what should I do to modify the table by using CONSTRAINT in order to avoid the above error message?
Thanks.
Hongbo Received on Fri Apr 09 1999 - 14:58:18 CEST