Assignment 9

You might also like

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 2

1.create DEPT table based on the following table instance chart.place the syntax in a script lab_09_01.

sql then execute the statement in a script to create a table.

Ed used to c:\lab_09_01.sql 2.populate the DEPT table with data from the departments table include only columns that u need.

3. Create the EMP table based on the following table instance chart. Place the syntax in a script called lab_09_03.sql, and then execute the statement in the script to create the table. Confirm that the table is created. Ans.. create table emp(id number(7),last_name varchar2(25),first name varchar2(25),dept_id number(7) constraint emp_dept_id__fk references dept(id); By ed command save it.c:\lab_09_03.sql 4.. create the employees2 table based upon the structure of employees table which include employee_id,first_name,last_name,salary,dept_id..name the coulumn in your table id,first name,last name,salary,dept_id respectvily.

5.drop the emp table.

You might also like