How to ADD a SQL SERVER name in every row of a table.

  • Hi Development Guys,

    I need to add a column in a SQL server database table ( which i have done). Now i have to add SQL SERVER name on every row of the table in this new column ( same entry on every row).

    Can some please help me how to accomplish that?

    Thanks in advance.

  • UPDATE table SET newcol = @@SERVERNAME

    Unless I'm really not understanding the question?


    - Craig Farrell

    Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

    For better assistance in answering your questions[/url] | Forum Netiquette
    For index/tuning help, follow these directions.[/url] |Tally Tables[/url]

    Twitter: @AnyWayDBA

  • Thanks a lot, i already found the update statement and it solved my problem.... Thanks again.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply