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

Mention the different authentication modes in sql server.

1056


What are joins in sql and what are the different types of joins?

1014


When cursors are useful?

1104


What is set nocount on?

940


How to test odbc dsn connection settings?

1036


How to download and install the scaled-down database adventureworkslt?

992


Different types of keys in SQL?

1099


What Is Rdbms?

1159


How do you delete duplicate rows in sql server?

959


How many types of stored procedures are there in sql server?

1016


Can multiple columns be used in sql group by clause in ms sql server?

1051


Explain log shipping and mention its advantages.

1044


What is the default sql server instance name?

1036


How do you improve the performance of a SQL Azure Database?

137


What is sql sandbox in sql server?

1227