Hey! this is my current script below.
I want to add in a statement that changes the email column for all rows to equal a combination of the name column and ‘.com’ - how would I do this?
CREATE TABLE friends (
id INTEGER,
name TEXT,
birthday DATE
);
INSERT INTO friends (id, name, birthday)
VALUES(1, ‘Ororo Munroe’, ‘1940-05-30’);
INSERT INTO friends (id, name, birthday)
VALUES(2, ‘x’, ‘1999-01-01’);
INSERT INTO friends (id, name, birthday)
VALUES(3, ‘y’, ‘2005-01-01’);
UPDATE friends
SET name = ‘storm’
WHERE id=1;
UPDATE
friends
SET
name = REPLACE(name,‘y’,‘stormtrooper’)
WHERE
id <4;
SELECT *
FROM friends;