Tell us what’s happening:
Im trying to delete a row ( row id 3, username ‘Luigi"), no matter how I write the line it pops up error saying there shouild not be a row for ’ Luigi’.
i’ve tried several differnt ways to put in the code but to no avail and now i can not go forward or get a hint, just stuck… can anyone help?
Your code so far
second_database=> INSERT INTO second_table (id, username) VALUES(3, ‘Luigi’);
INSERT 0 1
second_database=> SELECT * FROM second_table;
second_database=>
±—±---------+
| id | username |
±—±---------+
| 1 | Samus |
| 2 | Mario |
| 3 | Luigi |
±—±---------+
(3 rows)
second_database=> DELETE FROM second_table WHERE username=luigi’;
second_database’> DELETE FROM second_table WHERE username=‘luigi’;
second_database’> DELETE FROM table_name WHERE condition;
second_database’> DELETE FROM table_name WHERE condition;
second_database’> DELETE FROM table_name WHERE username=‘luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’);
second_database’> psql --troy04=freecodecamp --dbname=second_database
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_database WHERE usrname=‘Luigi’;
second_database’> DELETE FROM second_database WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE id=3, username=‘Luigi’;
second_database’> DELETE FROM second_table WHERE id=3;
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36
Challenge Information:
Learn Relational Databases by Building a Mario Database - Build a Mario Database