Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Problem with foreign key!

Author  Topic 

Oha055
Starting Member

1 Post

Posted - 2009-10-07 : 15:31:40
Hi guys,

I'm new to SQL programming.I was wondering why I get an error message when trying to create this table:

CREATE TABLE author(
name VARCHAR2 (30),
book VARCHAR2 (30),
CONSTRAINT pk_nameBook PRIMARY KEY(name, book),
CONSTRAINT fk_book FOREIGN KEY(isbn) REFERENCES book
);

The foreign key is located in a previously created table kalled book.

The error I'm getting is: "ORA-00904: "ISBN" invalid identifier" ++

Thanks alot for your help!!

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-10-07 : 15:51:50
This is a Microsoft SQL Server site, so you should post your question on an Oracle site to get better help. Try dbforums.com or any of the other Oracle forums.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page
   

- Advertisement -