Hello guys,

I am currently getting the error
[Err] 1093 - You can't specify target table 'tbl_login' for update in FROM clause
when trying to run the below query.

Any help would be much appreciated!

Many thanks in advance for your time.

Code:
UPDATE tbl_login
SET login1 = (
	SELECT
		SUBSTRING_INDEX(EMAIL, '@', 1) AS login1
	FROM
		tbl_login
)
WHERE
	1
AND ISNULL(login1);