SQLクエリ:
select
usr.username,
(
select usr2.username
from users as usr2
) as another_user
from users as usr
having usr.username != another_user
usr.usernameたとえば、名前の付いたサブクエリと比較するにはどうすればよいanother_userですか?
usr.usernameが等しくないすべての結果を取得したいanother_user
WHERE句またはを試しましたHAVINGが、それでもエラーが発生します
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax