How do I set the DEFAULT value for a non-nullable column to the TOP 1 result of a SELECT query?
I’m trying to add a non-nullable column to an already existing table, and I read somewhere that I need a DEFAULT value in order to do that. The value for the DEFAULT needs to be equal to the TOP 1 user_id result of the SELECT query shown below. I tried using a variable, but this didn’t work.