开发者

How do you use the results from a query to automatically update a table

开发者 https://www.devze.com 2023-02-06 07:15 出处:网络
Basically, I have a calculated field I am creating using开发者_开发知识库 a select query. I want to use the results of this calculation to update a column in an existing table. How do I do that in the

Basically, I have a calculated field I am creating using开发者_开发知识库 a select query. I want to use the results of this calculation to update a column in an existing table. How do I do that in the same query? How do I use the results of a calculated field to automatically update my table?


Use the select as the value in an update statement.

UPDATE <table> SET <column> = (SELECT ...)

0

精彩评论

暂无评论...
验证码 换一张
取 消