SQL Server: "Modify" and "change"

Source: Internet
Author: User

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"

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.