Alter exercise

<PLEASE USE THIS TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>
https://www.codecademy.com/en/courses/learn-sql/lessons/manipulation/exercises/alter?action=resume

<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
When I try to run it, nothing happens. I am very confused.
<In this course, it often helps to include a screenshot of your whole web browser – that lets everyone see what you see. If you wish to include a screenshot, add it below this line.>

<If you wish to copy/paste in your code, you can use this next section. This will allow others to copy/paste your code for testing – something that they won’t be able to do with just a screenshot.>

UPDATE celebs
SET twitter_handle = β€˜@oallam26’
WHERE id = 3;

SELECT * FROM celebs;

DELETE FROM celebs WHERE twitter_handle IS NULL;

```

UPDATE celebs
SET twitter_handle = β€˜@oallam26’
WHERE id = 3;

SELECT * FROM celebs;

DELETE FROM celebs WHERE twitter_handle IS NULL;

<do not remove the three backticks above>

write DELETE command above SELECT

Thanks.

It deleted all the rows without twitter_handle, but the instruction still isn’t being checked.

THis is my code:

UPDATE celebs
SET twitter_handle = β€˜@oallam26’
WHERE id = 3;

DELETE FROM celebs WHERE twitter_handle IS NULL;

SELECT * FROM celebs;

1 Like

This actually works

UPDATE celebs
SET twitter_handle = β€˜@taylorswift13’
WHERE id = 4;

DELETE FROM celebs WHERE twitter_handle IS NULL;

SELECT * FROM celebs;

1 Like

Yea the above still isn’t working. I’ve typed everything to a T and still nothing.

Ok. Figured it out. You have to enter it twice. Like so:

UPDATE celebs
SET twitter_handle = β€˜@taylorswift13’
WHERE id = 4;
DELETE FROM celebs WHERE twitter_handle IS NULL;
SELECT * FROM celebs;

DELETE FROM celebs WHERE twitter_handle IS NULL;

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.