Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How create a new table, which will have a specific value

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?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading