SQL Server: How to perform Rtrim on all varchar columns of a table

前端 未结 5 2004
眼角桃花
眼角桃花 2020-12-30 01:40

I have over 30 columns in my table (sql server 2008). Columns type are varchar(x). I know that in every column there is two extra spaces at the end of column value. How to u

5条回答
  •  情话喂你
    2020-12-30 01:59

    The accepted answer works well. I ran into an issue with a temp table being named the same name. You can add

    and TABLE_SCHEMA = 'dbo'
    

    And that will get rid of collision on table names.

提交回复
热议问题