column type incompatible with reference column type

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sathya venkat
    New Member
    • Dec 2012
    • 1

    column type incompatible with reference column type

    Code:
    create table dep(Dept_id number ,dname varchar(25),job varchar(13),eid number, foreign key(Dept_id) references emp(eid));
    what mistake i did in this code
    Last edited by zmbd; Dec 26 '12, 03:59 PM. Reason: [Z{Please use the <CODE/> button to format posted code/html/sql}]
  • debasisdas
    Recognized Expert Expert
    • Dec 2006
    • 8119

    #2
    I do not understand why dept_id refers eid

    and by the way what is the data type of eid column in emp table ?

    Comment

    • zmbd
      Recognized Expert Moderator Expert
      • Mar 2012
      • 5501

      #3
      Maybe... you should include the exact error message and number you received?

      Comment

      Working...