DivideDemo - insert into workload(employee_id project_id values(2 2 insert into workload(employee_id project_id values(2 3 insert into

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
drop table workload cascade constraints; drop table project cascade constraints; create table project ( project_id number PRIMARY KEY, projectName varchar (20) ); ) create table workload ( employee_id number, project_id number, constraint pk_workload primary key (employee_id, project_id), constraint fk_project_id foreign key (project_id) references project ); ) insert into project (project_id, projectName) values (1, 'Construction'); insert into project (project_id, projectName) values (2, 'Decoration'); insert into project (project_id, projectName) values (3, 'Renovation'); insert into workload (employee_id, project_id) values (1, 1); insert into workload (employee_id, project_id) values (2, 1);
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: insert into workload (employee_id, project_id) values (2, 2); insert into workload (employee_id, project_id) values (2, 3); insert into workload (employee_id, project_id) values (3, 3); insert into workload (employee_id, project_id) values (4, 1); insert into workload (employee_id, project_id) values (5, 1); insert into workload (employee_id, project_id) values (5, 2); insert into workload (employee_id, project_id) values (5, 3); i select employee_id from workload group by employee_id having count(project_id)=(select count(*) from project);...
View Full Document

This note was uploaded on 12/22/2009 for the course DBST DBST 651 taught by Professor Yelena - ta during the Spring '09 term at MD University College.

Ask a homework question - tutors are online