Link to home
Start Free TrialLog in
Avatar of learningnet
learningnet

asked on

Ambiguous column name 'CustID'.

Hello Experts,

I have 2 tables Customer and GiftCerticate both has a column name CustID

am trying to write the below query to check email and dob from Customer and this custid should exist
in giftcertificate table ...

SELECT CustID FROM Customer, GiftCertificate
WHERE Customer.CustEmail='test@test.com'  
AND Customer.CustDOB='15/10/1906'  
AND GiftCertificate.CustID = Customer.CustID


but i am getting this error
Ambiguous column name 'CustID'..

please can someone advise
thanks
ASKER CERTIFIED SOLUTION
Avatar of Blackninja2007
Blackninja2007

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial