you can’t select the same table you’re trying to update
in this particular instance, you don’t need the subquery at all
UPDATE tbl_login
SET login1 = SUBSTRING_INDEX(email,'@',1)
WHERE login1 IS NULL
p.s. when i saw your thread in the forum list, this is what showed –
[MySQL 5.0.45-community-nt-log] [Err] 1
you can probably shorten your database identification, and if you put it at the end rather than at the beginning, the topic of your thread will actually be readable in the forum list –
Error 1093 - You can’t specify target table [MYSQL 5]