How to UPDATE from a SELECT statement using dbForge Query Builder for SQL Server
In this tutorial, we will show how to convert SELECT query into UPDATE statement with the saving of WHERE condition using dbForge Query Builder for SQL Server.
0:00 Introduction
0:08 Welcome to dbForge Query Builder for SQL Server Tutorials
0:30 Create a SELECT query
0:44 Specify a selection condition
1:00 Performing the UPDATE from the SELECT statement and run it
1:10 Preview updated data
☑️ Find more information about dbForge Query Builder for SQL Server here:
https://www.devart.com/dbforge/sql/querybuilder/
☑️ Download dbForge Query Builder for SQL Server:
https://www.devart.com/dbforge/sql/querybuilder/download.html
#SQLUPDATE #SQLSELECT #QueryBuilder #SQLQuery #SQLServer #SQL #dbForge #Devart #Database
Closed Caption:
Welcome to dbForge Query Builder for Sequel
Server Tutorials.
In this tutorial, we will show how to:
create a SELECT query,
preview updated data,
convert a SELECT query to an UPDATE query
and run it.
Let's select the Example.Customer table and
check its content.
You can see that the Address type for all
records equals "Home".
Let's create a query that will change the
"Home" value to "Office"for all rows with
the CustomerID field values between 130 and
730.
Send the table to the Query Builder.
The SELECT query for the table was created.
Now, let's specify a selection condition:
Values of the CustomerID column are between
130 and 730.
You can preview the rows that have to be changed.
You can see a lot of matching records.
Now change the query type to UPDATE, select
the AddressType as the column to be updated,
and set its value to "Office".
Execute the query.
Now return to the table and refresh it to
review the updated data.
Click the Filter icon on the AddressType column
header and select "Office".
You can see that the required rows were successfully
updated, while the rest of the rows remain
unchanged.
You can download a 30-day trial edition of
dbForge Query Builder for Sequel Server at
Devart.com.
Thank you for watching.
Video Length: 01:39
Uploaded By: Devart
Published: 6/25/2021
View Count: 710