Create table Employee
(
Employee_Id varchar2(8) Constraint emp_id_pk primary key,
FirstName varchar2(50),
LastName varchar2(50),
DeptID Number(5)
Constraint dept_id_fk Foreign Key(DeptId)
References Department(DeptId)
)

Error I am getting: Constraint specification are not
allowed here

Answer Posted / durgarao k

Create table Employee
(
Employee_Id varchar2(8) Constraint emp_id_pk primary key,
FirstName varchar2(50),
LastName varchar2(50),
DeptID Number(5),
Constraint dept_id_fk Foreign Key(DeptId)
References Department(DeptId)
)

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is partitioned table in Oracle?

631


Why do we need integrity constraints in a database?

584


How to convert times to characters in oracle?

605


What is a nvl function?

561


How to use "in" parameter properly?

617






What are the uses of Database Trigger ?

1100


What is the difference between view and materialized view in Oracle?

606


What is the usage of save points in oracle database?

533


What is an oracle cursor variable?

607


How to pass a cursor variable to a procedure?

556


How to enter a new row into a table interactively?

545


Is oracle a language?

522


How to assign a table row to a record variable?

580


What are nested tables?

671


How to use "in out" parameter properly?

612