If there is a constraint violation from attempting to insert data into a table that doesn’t fit the constraints, will an error message appear or will that data simply not be entered?
This is important because if the data isn’t entered and there is no error message, the developer may not know that some data wasn’t placed into the table.
I think we removed all rows that had no information on the Twitter handle. If you
SELECT * FROM celebs;
you’ll see that only 1 row is left. We removed all the others because we only added the Twitter handle for Taylor Swift.
Hi guys! In the constraints lesson when we run the mentioned command, why is the number of rows showing as 1 instead of 0? We did not insert any data into the table yet.
Hello,
I had inserted all the code required but instead of ‘Grammy’ I typed “Grammy” with double quotes and it showed me the error text “Make sure the columns have appropriate constraints set.”.
With single quotes it all works ok.
I’m not certain but it might just be annoyingly strict testing that is looking for that text to be formatted in the same way as the example (which would make this a somewhat deceptive error code). It is worth formatting it like shown in the instructions though since that would be my first guess as to why it fails.
What happened was that i used “ ” instead of ‘ ’ to quote Grammy. As I’m doing this course in a Tablet + keyboard it is easy only to spot the “” key and I believe that in my case this was the one to use, but in the end i could find the right key.
I used single quotes, but just had one quote “one space out” & it gave an error, whch does not happen on SQL server,
so mus be a few imperfections /differences when writing to this editor,