Help Center/
GaussDB/
Developer Guide(Centralized_8.x)/
FAQ/
How do I create a column whose default value is the current time?
Updated on 2024-06-03 GMT+08:00
How do I create a column whose default value is the current time?
Answer: When creating a table, set the default value of the column to CURRENT_TIMESTAMP.
gaussdb=#CREATE TABLE tbl (id int, modtime date DEFAULT CURRENT_TIMESTAMP);
Parent topic: FAQ
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot