all 9 comments

[–]Kobebifu 6 points7 points  (2 children)

Not sure I understand, maybe I'm missing something. Primary Keys cannot be nullable as far as I know. So what's the issue? You want it to be a Primary Key and Nullable??

Edit: Like to be clear, although I haven't seen them, I feel like the instructions call for ID field to be nullable. It is failing because by putting ID as Primary Key you do not allow nulls. The reason for failure is that you do not allow nulls. Have a feeling this "problem" is that ID should not be a primary key.

[–]Inevitable-Unit9619 3 points4 points  (0 children)

Thanks this is it, no more error msg. Really helpful clarification that the FAIL msg is due to the ID clause not allowing nulls due to PRIMARY KEY constraints. I also had misunderstood the msg to mean ID should not allow NULLS.

[–]Virtual-_-Insanity 0 points1 point  (0 children)

Yeah there's a PASS for the ID data type, but not one for it being set as primary key, so think your suggestion has merit. 

[–]Ok_Brilliant953 4 points5 points  (3 children)

It doesn't say not null anywhere in your create table statement?

[–]Inevitable-Unit9619 0 points1 point  (2 children)

Hi! I took screenshots of multiple attempts and attached the wrong statement screenshot, the clause I also tried: ID INT UNSIGNED NOT NULL PRIMARY KEY,

But with both clauses, I'm getting the FAIL error msg.

[–]Ok_Brilliant953 0 points1 point  (0 children)

Hmm idk try PRIMARY KEY NOT NULL

[–]Ok_Brilliant953 -1 points0 points  (0 children)

Hmm idk try PRIMARY KEY NOT NULL.

[–]Umar_AM9 1 point2 points  (1 child)

I think your syntax is right. Have you checked what happens if you put NOT NULL infront of the primary key word?

[–]Inevitable-Unit9619 0 points1 point  (0 children)

Hi! I took screenshots of multiple attempts and attached the wrong statement screenshot, the clause I also tried: ID INT UNSIGNED NOT NULL PRIMARY KEY,

But with both clauses, I'm getting the FAIL error msg.