> For the complete documentation index, see [llms.txt](https://learnsql.gitbook.io/lernmysql/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learnsql.gitbook.io/lernmysql/welcome-to-the-mysql-tutorial/thiet-lap-null-va-not-null-cho-column.md).

# Thiết lập Null và Not Null cho Column

Nếu bạn muốn một column bắt buộc nhập dữ liệu khi thêm mới thì bạn sẽ sử dụng từ khóa NOT NULL. Ngược lại thì bạn sẽ dùng từ khóa NULL (*mặc định là NULL*).

```
CREATE TABLE SINHVIEN(
    TenSV VARCHAR(255) DEFAULT 'noname',
    MaSV INT(11) NOT NULL,
    NamSinh INT(4)
) ENGINE = InnoDBsinhvien;
```
