select id,pubdate, typeid,aid,jobname,jobdepart,jobplace,jobnumber,jobcontact from
archives right join jobrt on id=aid where typeid=19
1, table archives have fileds: id,pubdate,typeid...
2, table jobrt have fields:aid,jobname,jobdepart,jobplace,jobnumber,jobcontact, typeid..
3, id=aid
now, i want to select out the id column the jobname,jobplace comlumns when typeid=19,..
thank you
since two tables: archives
and jobrt
contains columnName typeID
, you need to specify the tableName where the value came from, eg
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