In SQL, How to add values after add a new column in the existing table?

前端 未结 7 1449
臣服心动
臣服心动 2021-02-14 13:34

I created a table and inserted 3 rows. Then I added a new column using alter. How can I add values to the column without using any null values?

相关标签:
7条回答
  • 2021-02-14 14:09

    Why don't you use UPDATE statement:

    UPDATE tablename SET column=value <WHERE ...>
    

    WHERE is optional. For instance in T-SQL for table:

    I can update column NewTestColumn by this statement:

    UPDATE [dbo].[Table] SET [NewTestColumn] = 'Some value'
    
    0 讨论(0)
提交回复
热议问题