I am trying to configure a "default value" for a column that has the same value as another column in a corresponding row. So I've tried doing this:
UPDATE table
SET field1 = field2
But I don't want to do this manually, it should happen automatically whenever a new row gets inserted.
At first I thought this would be an easy task. But the best solution I found so far was a sql script stored in a job which gets started by our SQL server agent.
Is there a solution that works like a default value? Or is my idea stupid, since I try to create a "default value" based on a value which doesn't even exist until the insert happens? In that case: I'm asking for a friend...
Thank you for your help.