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 merge in oracle?

563


Provide an example of a shell script which logs into SQLPLUS as SYS, determines the current date, changes the date format to include minutes & seconds, issues a drop table command, displays the date again, and finally exits.

1582


What is oracle and what are its different editions?

581


What is oracle used for?

538


How to use null as conditions in oracle?

584






How to retrieve the count of updated rows?

576


What happens if the update subquery returns multiple rows?

614


How to convert characters to numbers in oracle?

596


Explain the blob datatype?

622


Does oracle partitioning improve performance?

554


20. Using a set operator, display the client number of all clients who have never placed an order.

1803


What is not equal to in oracle?

531


What is the difference between a primary key & a unique key?

590


how can db_files > maxdatafiles since db_files is for instance and the later is for database

2180


what are bitmap indexes? How does they work?

1721