2.2k views
5 votes
When inserting a row into a table, how can you indicate that a row contains a null value?

User BrendanMcK
by
8.2k points

1 Answer

5 votes

Answer:

When inserting a row into a table, you can indicate that a column contains a null value by using the keyword "NULL" in the corresponding value position.

Step-by-step explanation:

consider a table named "students" with columns "id", "name", and "age". If you want to insert a new row with a null value in the "age" column, you can use the following SQL statement:
INSERT INTO students (id, name, age)

VALUES (1, 'Dave Batista', NULL);

User Jyemin
by
8.7k points