I am on step 3 in this project, and I am supposed to fill in the missing descriptions in a table,
empty descriptions are however not recognized as NULL objects because they are ‘space’ characters.
Now, when I use this code to fill them in: UPDATE parts SET description = 'None available' WHERE description IS NULL OR description = ' ';
it actually deletes the rows were the description is space character (???)
Anyone had a similar problem?
When I only use WHERE descirption IS NULL it is not recognized and the table is not updated, that is my table after WHERE description = ’ ’ :
I am doing it in the photo that is provided, when I dont use or equals ’ ’ it does not fill them, because they are not null, they are recognized as ascii_value 32, when I use equals ’ ’ it deletes rows. Even if i try to SET description WHERE id = 3; it gets deleted as well.
I thought the affected rows were being deleted too until I realised that they were actually just shuffled down to the bottom of the table and therefore out of the top 10 entries that we LIMIT the view to.