【文章內(nèi)容簡(jiǎn)介】
edu char(10), address char(50), tel char(20), birth datetime NOT NULL, ) ( 2) 職稱 表的建立: 7 Create table position( eno char(20) not null PRIMARY KEY foreign key references employee(eno), 主鍵和外鍵約束 pjob char(8) not null, pdepartment char(10) , ) ( 3)、部門表的建立: create table department ( eno char(20) not null PRIMARY KEY foreign key references employee(eno), dno char(20) NOT NULL, position char(20) 8 ) 視圖的建立: (1)、員工及部門信息視圖: create view view_employee as select as 員工號(hào) ,ename as 姓名 ,sex as 性別 ,age as 年齡 , edu as 學(xué)歷 ,address as 住址 ,tel as 聯(lián)系電話 ,birth as 出生年月 , position as 職位 ,dno as 部門號(hào) from employee,department where = 9 創(chuàng)建索引: create unique clustered index ix_eno on employee(eno desc) create unique clustered index ix_sno on salary(eno desc) create unique clustered index ix_dno on department(eno desc) 存儲(chǔ)過程的建立: (1)、插入員工信息: create proc input_employee ( @員工號(hào) char(20), @姓名 char(20),