From the course: Learning SQL Server 2017

Unlock the full course today

Join today to access over 22,700 courses taught by industry experts or purchase this course individually.

Write an UPDATE statement

Write an UPDATE statement - SQL Server Tutorial

From the course: Learning SQL Server 2017

Start my 1-month free trial

Write an UPDATE statement

- [Instructor] Using a query, we can update data that's stored in the data tables. This will require the use of a new keyword that we haven't seen yet called Update. First, I want to review the information that's stored in a table here in the Wide World Importers database called Sales.SpecialDeals, and we can do that with a new query window. First I'll type in the keyword Select. Now at this point I don't know the names of the columns that I want to pull out of the table, so I can use a wildcard character, the asterisk, which is the Shift + 8 on your keyboard, and this'll just be a shortcut way of saying just select every column from the table. We'll come down to the next line and we'll say from, and the name of the table was Sales.SpecialDeals. Let's go ahead and execute this query, and we'll get these results down below. Now this table only has two records currently. The first is a discount that applies to orders placed by a company called Wingtip Toys. We can see in the Deal…

Contents