1. Preface 2. Modifying Data via SSMs 3. Modifying data with SQL statements
- 3.1 Modifying single-column data
- 3.2 Modifying multiple columns of data
1. Preface
Additions and deletions are the operation of the data, where the "change" of the corresponding SQL statement is "Update", that is, "updated" meaning.
This article mainly introduces the data modification, and uses Ssms/sql to modify the data respectively.
2. Modifying data via SSMs
Select Database->ssmstest-> table->dbo.student Right-click dbo.student Select Edit First 200 rows. Select the data directly to make changes, then click on the other lines and it will be saved automatically.
3. Modifying data with SQL statements3.1 Modifying single-column data
The syntax for the SQL statement update is as follows:
UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
For example:
update student set sdept = ‘文学院‘ where sno = 0005
3.2 Modifying multiple columns of data
Separate them with commas.
For example:
update student set ssex = ‘男‘, sdept = ‘文学院‘where sno = ‘0007‘
SQL Server: "Modify" and "change"