0

I created a table in mysql. Every column in my table I created with NOT NULL. What does the NULL value in my DEFAULT column mean? I never plan to have a NULL value in those columns.

+------------+--------------+------+-----+-------------------+-------+
| Field      | Type         | Null | Key | Default           | Extra |
+------------+--------------+------+-----+-------------------+-------+
| user_id    | binary(16)   | NO   | PRI |                   |       |
| first_name | varchar(255) | NO   |     | NULL              |       |
| last_name  | varchar(255) | NO   |     | NULL              |       |
| email      | varchar(255) | NO   | UNI | NULL              |       |
| digest     | binary(40)   | NO   |     | NULL              |       |
| join_ts    | timestamp    | NO   |     | CURRENT_TIMESTAMP |       |
+------------+--------------+------+-----+-------------------+-------+

1 Answer 1

1

This means you don't have a default value for these columns. If you have a default value, you can create an insert query without that column. With your table, you must give a value to all the null default's columns

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.