1052 - The column "typeid" in the list of fields is ambiguous

select id,pubdate, typeid,aid,jobname,jobdepart,jobplace,jobnumber,jobcontact from archives right join jobrt on id=aid where typeid=19 

1, there are files in the table archives: id, pubdate, typeid ...

2, table jobrt have fields: help, jobname, jobdepart, jobplace, jobnumber, jobcontact, typeid ..

3, id = help

now, I want to highlight the id column with the name job, comlumns jobplace, when typeid = 19, ..

Thank you

+4
source share
2 answers

since the two tables: archives and jobrt contain columnName typeID , you need to specify the table_name, where the value is received from, for example

 SELECT id , pubdate , jobrt.typeid , aid , jobname , jobdepart , jobplace , jobnumber , jobcontact FROM archives RIGHT JOIN jobrt ON archives.id = jobrt.aid WHERE jobrt.typeid = 19 
0
source

You should determine which table in the select item is something like the following:

 select archives.id,archives.pubdate, archives.typeid,aid,jobname,jobdepart,jobplace,jobnumber,jobcontact from archives right join jobrt on id=aid where typeid=19 
0
source

All Articles