forum

home / developersection / forums / error while join table in sql

Error while join table in SQL

Anonymous User 1919 21-Aug-2014

I have two tables that have relationship with UserName field. Based on UserName column, I want to get ID from CarReserve table. Here is my SQL statement:

SELECT CarReserve.ID

FROM CarReserve

 INNER JOIN aspnet_Users ON CarReserve.UserName = aspnet_Users.UserName

WHERE UserName = @UserName

Unfortunately, I am getting this warning:

Ambiguous column name "UserName"

Can anyone here tell me what is wrong with my statement?


Updated on 21-Aug-2014

I am a content writter !


Message
Can you answer this question?

Answer

1 Answers

Liked By