all groups > sql server programming > november 2006 >
You're in the

sql server programming

group:

Column default value = machinename


Column default value = machinename danthi
11/18/2006 4:39:31 PM
sql server programming:
I net to set the default value of a column to the name of the computer.
I know I can use @@servername but that also includes the instance name
which I don't want.

Is there a way to strip the instance name from the @@servername inside
the default column attribute?
Re: Column default value = machinename Aaron Bertrand [SQL Server MVP]
11/18/2006 9:05:03 PM
How about SELECT HOST_NAME()



[quoted text, click to view]

AddThis Social Bookmark Button