Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Help!!! How to use CONSTRAINT

Help!!! How to use CONSTRAINT

From: Hongbo Zhang <hongbozhang_at_yahoo.com>
Date: Fri, 09 Apr 1999 12:51:24 GMT
Message-ID: <gJmP2.902$0C1.109192@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 this error message?

Thanks.

Hongbo Received on Fri Apr 09 1999 - 07:51:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US