我使用PostgreSQL和創建見下表:日期字段將自動填寫
CREATE TABLE "TrainingMatrix"
(
payroll text NOT NULL,
"TrainingName" text NOT NULL,
"Institute" text,
"TrainingDate" date NOT NULL,
"ExpiryDate" date,
"RecorderName" text,
"EnteringDate" date,
CONSTRAINT "TrainingMatrix_pkey" PRIMARY KEY (payroll, "TrainingName", "TrainingDate")
)
我想讓EnteringDate
被自動由當前的日期在機器每次進入記錄填寫。
在Postgres中沒有'sysdate'。 –