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 field types?
what are the different index configurations a table can have? : Sql dba
How can you load multi line records? : aql loader
What is a table in a database?
How does a trigger work?
how to create a new table by selecting rows from another table in mysql? : Sql dba
what are tables and fields? : Sql dba
What are the dml statements?
when is the use of update_statistics command? : Sql dba
what are the differences between get and post methods in form submitting. Give the case where we can use get and we can use post methods? : Sql dba
Can we insert data in view?
What does pl sql developer do?
What is %rowtype in pl sql?
Can I create table without primary key?
What is union and union all keyword in sql?