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