-
After uploading the cover images, my database is 110MB in size. I've created 2 queries but I can't really see the result :
with the UPDATE command, my database is 2.7MB in size Why is my database after DELETE twice as large as with UPDATE? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 3 replies
-
The BYTEA type must not be populated with a string. Set the columns to NULL. If a column allows for a NULL, set a NULL if that's the intent. Don't set it to an empty string if you desire a NULL. An empty string is not a NULL string. You cannot delete a column from a table so the query is nonsense. You can drop a column but that's destructive. |
Beta Was this translation helpful? Give feedback.
-
An empty string will not be discoverable if a query intends to discover NULL values. You'll need to test the length of the string in addition to NULL. I recommend purchasing a book on SQL and reading it thoroughly instead of using discussions as personal forever-present assistants. :P |
Beta Was this translation helpful? Give feedback.
-
Languages cannot be simple if they want to exchange complex ideas. |
Beta Was this translation helpful? Give feedback.
-
Like I'm sure that it's impossible to translate a Vietnamese poem into French while retaining the pitch of the poem. SQL isn't easy but that's because data possibilities are infinite. More practice, better results. |
Beta Was this translation helpful? Give feedback.
UPDATE book SET front_cover = NULL
thank you for your advice !