create table Employees(
employeeID varchar2(6) not null primary key,--員工編號
Name varchar2(10) not null,--姓名
Birthday date not null,--出生日期
Sex varchar2(2) not null,--性別
Address varchar2(20) not null,--地址
Zip varchar2(6),--郵編
Phonenumber varchar2(12),--電話號碼
Emailaddress varchar(30),--電子郵件
deparmentID varchar2(3) not null constraint fk_employees_departments_departtmentID foreign key references Departments(departmentID)--員工部門號
)
create table Departments(
departmentID varchar2(3) not null primary key,--部門編號
departmentName varchar2(20) not null,--部門號
note varchar2(16)--備注
)
uj5u.com熱心網友回復:
fk_employees_departments_departtmen,太長了,改短點的名字。uj5u.com熱心網友回復:
外鍵fk_employees_departments_departtmentID名字太長了,超出了Oracle支持的長度,改短點,建議30字符以下。轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/18054.html
標籤:基礎和管理
上一篇:oracle客戶端無監聽服務
