how to Update table Sales_summary with max(sales) data from
table sales_dataTable 1. sales_data table Table 2.
Sales_summary
Region sales Region sales
N 500 N 0
N 800 W 0
N 600
W 899
W 458
W 900
I want the Sales_summary After Update like this
Region Sales
N 800
W 900
Answer Posted / vipul garg
Update Sales_summary s1 set sales =
(
Select max(sales) sales
From sales_data s2
where s1.Region = s2.Region
);
Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
What are sql*plus environment variables?
What do you mean by “trigger” in sql?
State some properties of relational databases?
Define the select into statement.
Can we delete column in sql?
What is clustered index sql?
What are the different types of constraints?
Give the order of sql select?
What is benefit of creating memory optimized table?
Why we use stored procedure instead of query?
what are all the common sql function? : Sql dba
Why procedure is used in sql?
What has stored procedures in sql?
what are the other commands to know the structure of table using mysql commands except explain command? : Sql dba
how to delete an existing column in a table? : Sql dba