I want to create a new table that will have the value date (yyyy-mm-dd).
I tried to give a date while creating table, but I don’t know what to do after that, like what I should to do when I’m writing INSERT INTO appointments (appointment_date) VALUES(???)
I researched, but didn’t find anything simple, can someone say me that in simple words please?
>Solution :
Not sure about the question, but to insert a date you can do it like this:
INSERT INTO appointments (appointment_date) VALUES('2024-03-01');
Or for today:
INSERT INTO appointments (appointment_date) VALUES(CURRENT_DATE);
Or unknown date, NULL:
INSERT INTO appointments (appointment_date) VALUES(NULL);
See the manual