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

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

ouput should be in table format

Answers were Sorted based on User's Feedback



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

Answer / aparna sanas

true Output will come in table format in single row and single
column

Is This Answer Correct ?    10 Yes 6 No

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

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

More SQL Server Interview Questions

What is tabulation?

0 Answers  


How can we call UDF(User Define Function) using C# code in ASP.net ?

1 Answers  


Explain index in sql server?

0 Answers  


What new changes are being made in SQL Server?

0 Answers   Blue Star,


How reterive duplicate value in SQL?

6 Answers  






How many columns can we include on clustered index ?

0 Answers  


What are three SQL keywords used to change or set someone?s permissions?

3 Answers  


What is sql server locking?

0 Answers  


1.what are diff types of joins , and explain diff between cross join and full outer join 2.diff types of views 3. Diff types of index 4. What is diff b/w stores procedure and function procedure 5.diff between double and int in SQL 6.diff between char and varchar in SQL. 7.Oracle or SQL whice you will preferred and why.

0 Answers   Aptroid,


What is a covering index?

0 Answers  


Which tcp/ip port does the sql server run on? How can it be changed?

0 Answers  


what is meant by deafult in sql server?

2 Answers  


Categories