Documente Academic
Documente Profesional
Documente Cultură
But when we do
select * from salary_det1 NATURAL JOIN employee_leave NATURAL JOIN
leave_policy
where LEAVE_NAME='Casual leave' and LEAVE_DATE_FROM > '01-01-2012' and
LEAVE_DATE_TO < '01-09-2012' ;
O/p It checks for the where condition
1
EA12345
Geetha S
09-07-12
0
Casual leave
1
EA34567
Jayganesh
02-12
5
Casual leave 3
60500
3
3
20000
3
3
2750
10-07-10
3
3
n
500 01-07-13
M
3
n
07-07-12
18-01-12
10-
Geetha S
Jayganesh
The solution and workaround for the error when you want to drop tables
referenced by child tables, is to use the CASCADE CONSTRAINTS option in the
DROP TABLE statement. For example:
DROP TABLE table_name CASCADE CONSTRAINTS;
The CASCADE CONSTRAINTS option in the DROP TABLE SQL statement will drop
the FOREIGN KEY constraints of the child tables referenced.
Alternatively, you can manually drop and remove the foreign key key constraints
in other tables before performing the DROP TABLE operations on the parent table,
drop the foreign key constraints in other tables. To check what constraints are
referencing a table in Oracle, use the following command:
SELECT * FROM USER_CONSTRAINTS WHERE TABLE_NAME = "table_name";
To drop and delete the user constraints in Oracle use the following command in
SQL*Plus, Toad or other SQL tools:
ALTER TABLE table_name DROP CONSTRAINT constraint_name;