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
 Newbie stuck

Author  Topic 

muschamp
Starting Member

14 Posts

Posted - 2008-04-02 : 16:32:49
I'ma newbie so please bare with me.

I have two tables, they are tomcat and eagle. With column's named Id, speed, ceiling, range, and data in all the fields.

This is my query:

SELECT id
FROM tomcat INNER JOIN eagle
ON tomcat.id = eagle.id;

my error message:
Msg 209, Level 16, Stae 1, Line 1
Ambiguous column name 'id'

I'm using the book "Head First SQL" as a ref, without any luck. I'm using SQL 2005 express.

Any thoughts, I'm sure its a simple issue.
Thanks

US Navy - We are fueled, armed, and go for launch.

h2sut
Starting Member

40 Posts

Posted - 2008-04-02 : 16:46:54
If you join two table and dont specify the alias name, you will get this error
Go to Top of Page

singularity
Posting Yak Master

153 Posts

Posted - 2008-04-02 : 19:53:22
SELECT tomcat.id
FROM tomcat INNER JOIN eagle
ON tomcat.id = eagle.id
Go to Top of Page
   

- Advertisement -