guagay_wk
guagay_wk

Reputation: 28030

What to assign for MySQL column that must not be empty?

I have a MySQL table named customers. In this table, there is a column called fullname that must not be empty when a new row is created. Is it right to assign a Not Null attribute to this column to imply that the column cannot be empty?

Upvotes: 2

Views: 92

Answers (1)

Mureinik
Mureinik

Reputation: 311316

It a word - yes. If a column may not be empty, it should be defined as not null.

Upvotes: 2

Related Questions