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
how are mysql timestamps seen to a user? : Sql dba
What can I use instead of union in sql?
What is index example?
What is the most important ddl statements in sql are?
What is mutating sql table?
What is the difference between the sql*loader and import utilities? : aql loader
What are the types of variable use in pl sql?
Hi am new to PLSQL & facing problems in writing code like in SP, Functions, so any one having some SP coding with in depth explanation please share with me my Email ID suvarnaatsuvarna@rediffmail.com Or taking tanning on this please do contact me
what is clause? : Sql dba
Does view contain data?
If i can use sys.check_constraints to display my constraints from my database using sql server 2005, how can i display then if i am using sql server 2000????
What does inner join mean?
Explain what is table in a database?
What is the difference between inner join and outer join?
What is an example of translating a date into julian format?