0

I have two columns in specific table in Postgres. When new row is inserted, I want to know how to automatically insert data in two column enter image description here

So if I have a table insert table_name( nombre) values ('xxxxxx'). I want that creation_date(current day) and creation_user(current user in database) also inserted in the table.

Thanks for your help.

Best,

Stu
  • 30,392
  • 6
  • 14
  • 33
EdwinMald
  • 145
  • 1
  • 12

1 Answers1

0

if I understand your question correctly, that solves

"creation_date" timestamp not null default CURRENT_TIMESTAMP

see this question: here.

Kopper
  • 1
  • 2