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...

1. SELECT SUM(sal) as “Gross Salary” from EMPLOYEES;

2. SELECT MAX(sal) as “Highest Salary” from EMPLOYEES;

ouput should be in table format

Answer Posted / sandeep modapathi

select sum(Gross_Salary),sum(Highest_Salary) from (

SELECT SUM(Salary) as Gross_Salary,0 as Highest_Salary from
EmpSalaryDetails
UNION
SELECT 0,MAX(Salary) from dbo.EmpSalaryDetails
) as rowset

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is log in sql server?

1075


How to backup SQL Server Reporting Services ?

137


How can I change procedure name in sql server?

972


How to select an exiting database using mssql_select_db()?

909


What is scalar user-defined function?

994


Explain different types of self contained sub query?

948


How can a user-defined datatype be created?

934


What is sql server transaction log file?

992


what is a mixed extent? : Sql server administration

1022


How to find table changes in sql server?

1049


Can you edit the .rdl code associated with a linked report?

149


Do you know the isolation level that sql server support?

920


How to bind a view to the schema of the underlying tables?

945


What is the difference between composite index and covering index?

899


What is difference between createstatement and preparedstatement?

1022