Instruction
Great! We've reached the final section for this part. Let's review what we've learned.
A database architect can define a default value for a column in a table. If that's the case, you can use the default value:
- In an
INSERTstatement:
INSERT INTO author (id, first_name, last_name, photo, create_timestamp, is_active) VALUES (120, 'Gary', 'Brown', 'imgs/gary.jpg', '2018-08-25', DEFAULT);
INSERT:INSERT INTO author (id, first_name, last_name) VALUES (121, 'Mary', 'Taylor');
UPDATE operation:UPDATE author photo = DEFAULT WHERE id = 120;
Exercise
Well done! You've completed Part 3 and learned the various ways in which SQL can automatically generate values.
Click to finish this part.




