I am trying to write a function so it can be used as a default value for a column in a table. It exists as a procedure at the moment (which cannot be used as a column default) and uses ORDER BY newid() several times. Apparently this cannot be used in a function.

Is there anyway of randomly selecting a row in a user defined function?