Is it possible in SQL Server 2005 to set a default value for a column which comes from another table through a query or something?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Yes.
You can use a scalar UDF in a default constraint.
This will be RBAR (“Row By Agonizing Row”) for multi row inserts however and a trigger might well be more efficient.