How to make realtion between two tables in sql
===

I want to make relation between these two tables, I have created two tables emp and dept as shown below,

emp table
----------



> create table emp(empno number(4) constraint empnopk primary key,ename
> varchar(10) constraint enamenn not null, mgrno number(4) constraint
> mgrnofk references emp(empno),sal number(10) constraint salck
> check(sal between 2000 and 5000),age number(2) constraint ageck
> check(age>20),mobno number(10) constraint mobuq unique);

**


dept table
-----------



> create table dept(deptno number(10) constraint deptnopk primary key,dname varchar(10) constraint dnamenn not null,loc varchar(10) default 'xyz');




as the emp table is the master table and dept table is child table,to make relation between these two tables i have given query 



> alter table emp add constraint deptnofk foreign key(deptno) references
> dept(deptno);



when i give this query it is showing ORA-00904:"DEPTNO": invalid identifier

 **what may be the problem??**