Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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 / keerthi

update Sales_summary
set Sales=(select max(Sales)from Sales_data where
Region=&region) where Region=&region;

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can we find the number of rows in a table using mysql? : Sql dba

1123


What are the operators in sql?

1067


What is the difference between sum and count in sql?

1033


how can we repair a mysql table? : Sql dba

1040


How to combine two stored procedures in sql?

1321


who introduced sql?

1069


What is cross join sql?

962


what is the command used to fetch first 5 characters of the string? : Sql dba

1680


Explain unique key in sql.

1059


What are the different ddl commands in sql?

1247


What are the types of operators available in sql?

1115


What is a database event trigger?

1210


What are the properties of a transaction?

1185


Is oracel sql developer written in java?

1165


What are triggers and its types?

1116