mysql - SQL - Column in field list is ambiguous -


i have 2 tables bookings , worker. there table worker , table keep track of worker has in time frame aka booking. i’m trying check if there available worker job, query booking check if requested time has available workers between start end date. however, stuck on next part. returning list of workers have time available. read join table passed on shared column, tried doing inner join worker_name column, when try ambiguous error. leads me believe misunderstood concept. understand i;m trying , knows how it, or knows why have error below. guys !!!!

create table worker (             id int not null auto_increment,             worker_name  varchar(80) not null,             worker_code  int,              worker_wage  int,              primary key (id) )  create table booking (             id int not null auto_increment,             worker_name  varchar(80) not null,             start date not null,             end date not null,              primary key (id) ) 

query

select * workers inner join booking on worker_name = worker_name (start not between '2010-10-01' , '2010-10-10') order id 

#1052 - column 'worker_name' in on clause ambiguous

in query, column "worker_name" exists in 2 tables; in case, must reference tablename part of column identifer.

select * workers inner join booking on workers.worker_name = booking.worker_name (start not between '2010-10-01' , '2010-10-10') order id 

Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -