Ihave created 2foreign keys customer id and now iam tryin to run this command to getan output but get this error#1066 - Not unique table/alias: enter code here
{ SELECT productid
FROM javabase
. sales
JOIN sales
on sales
. customerid
= customer
. customerid
where customer
. customername
= Babu
; }
You have to use at least one alias when you join a table to itself. So instead of FROM sales JOIN sales
it would be FROM sales S1 JOIN sales S2
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.