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 / ajitnayak
update sales_sum s set sales =
(select max(sales) from sales_sum s2 where s.REGIN = s2.REGIN group by REGIN );
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is cursor and why it is required?
What is sqlcommand?
What is pl sql package?
Can we edit a view in sql?
What is sql partition function?
What are the benefits of pl/sql packages?
What are the different types of tables in sql?
What are the most important ddl statements in sql?
What are data types in pl sql?
What are sql data types?
What is snowflake sql?
Can we use having without group by in sql?
what is data manipulation language? : Sql dba
What is an inner join sql?
Why do we use %rowtype & %type in plsql?