SQL Constraints are rules used to limit the type of data that can go into a table, to maintain the accuracy and integrity of the data inside table.
CREATE TABLE table_name ( column1 datatype constraint, column2 datatype constraint, column3 datatype constraint .... )
- NOT NULL : the data of the column must have a value (can not have NULL value)
create a table students containing student's basic information
CREATE TABLE students ( student_id NUMBER PRIMARY KEY, student_firstName VARCHAR2(50) NOT NULL, student_lastName VARCHAR2(50) NOT NULL, student_major VARCHAR2(50) NOT NULL, );