2016-02-15 22 views
-1

我有一個名爲tUser的表。列是:如何使用sql server中的另一列更新表中的列名

  • UserID
  • FirstName
  • SecondName
  • LastName
  • Email

我需要更新SecondNameFirstName如果爲NULL。我怎樣才能做到這一點?

+0

與預期的結果 –

+0

使用給定的樣本數據'where'條件 –

+0

請在開始任何項目之前,讀一本書SQL。 – FLICKER

回答

0
update tUser set SecondName=FirstName 
where SecondName is null or SecondName ='NULL' or SecondName ='null' 
相關問題