2016-04-22 7 views
1

列を異なる値にするために制約を作成しようとしていますが、timesheet_approved行でエラーが発生し続けます。oracleに右括弧が欠けている(行7)

create table Funtom_timesheet 
(
timesheet_ID   number(3) constraint timesheet_pk primary key, 
timesheet_Emp   number(3) constraint timesheet_Emp not null references funtom_employee, 
timesheet_Wc   date  constraint timesheet_Wc not null, 
timesheet_OT   number(2) default 0, 
timesheet_Approved number(3) constraint timesheet_approved_uc unique(timesheet_Approved,timesheet_Emp) constraint timesheet_approved references funtom_employee 
) 
; 
+0

の欄に入力します。それらを分離してみてください)、[docs.oracle.com](http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7002.htm) – Spidey

答えて

0

多列制約は列定義の一部ではないと思います。 [Techonthenet](http://www.techonthenet.com/oracle/tables/create_table.phpでCREATE TABLE構文をチェック

create table Funtom_timesheet (
    timesheet_ID   number(3) constraint timesheet_pk primary key, 
    timesheet_Emp   number(3) constraint timesheet_Emp not null references funtom_employee(??), 
-------------------------------------------------------------------------------------------------------^ 
    timesheet_Wc   date  constraint timesheet_Wc not null, 
    timesheet_OT   number(2) default 0, 
    timesheet_Approved number(3), 
    constraint timesheet_approved_uc unique(timesheet_Approved,timesheet_Emp), 
    constraint timesheet_approved references funtom_employee(??) 
-------------------------------------------------------------^ 
); 

と参照

+0

初期エラーを取り除きましたが、今はエラーが表示されています未知のコマンド ")" –

関連する問題