I am trying the following code:
create table People ( first_name varchar(15) not null, last_name varchar(15) not null, registration_date date not null);
How can I make a default value for the date column? try the now()
, but it is not valid..
Advertisement
Answer
You can use current_date
create table People ( first_name varchar(15) not null, last_name varchar(15) not null, registration_date date not null DEFAULT (CURRENT_DATE) );