Professional Documents
Culture Documents
Moh&Ali
إھداء إلىWWW.ARAB
/OUG/HARDWARE/TEAM2000
3/21/2010
LES 09 Using DDL Statements
to Create and Manage Tables
ae
1. Ceate the DET table based on the following table instane hat. lae the syntax in a sipt alled
lab_0_01.sql, then exeute the statement in the sipt to eate the table. Confim that the table is
eated.
desc dept;
2. opulate the DET table with data fom the DEARTMENTS table. Inlude only olumns that you need.
from departments;
3.Ceate the EM table based on the following table instane hat. lae the syntax in
a sipt alled lab_0_03.sql, and then exeute the statement in the sipt to eate the table. Confim
that the table is eated.
desc emp;
4. Ceate the EMLOYEES2 table based on the stutue of the EMLOYEES table. Inlude only the
EMLOYEE_ID, FIRST_NAME, LAST_NAME, SALARY, and DEARTMENT_ID olumns. Name the olumns in
you new table ID, FIRST_NAME, LAST_NAME, SALARY , and DET_ID, espetively.
. مبنى على بناء جدول الموظفين األساسى مع اخد الحقول على ھذا الترتيب بالتوالى٢ يريد عمل جدول للموظفين:٤ حل السؤال
(id,first_name,last_name,salary,dept_id)
as ( select employee_id,first_name,last_name,salary,department_id
from employees);
drop table emp; . عاوز نعمل حذف للجدول بالكامل:٥ حل السؤال