Du kan bruge LOCATE til at finde positionen for @:
LOCATE('@',email)
Så for at finde domænet:
SELECT CASE
WHEN LOCATE('@',email) = 0 THEN ''
ELSE SUBSTRING(email,LOCATE('@',email)+1)
END as Domain
FROM YourTable
Du kan bruge LOCATE til at finde positionen for @:
LOCATE('@',email)
Så for at finde domænet:
SELECT CASE
WHEN LOCATE('@',email) = 0 THEN ''
ELSE SUBSTRING(email,LOCATE('@',email)+1)
END as Domain
FROM YourTable