CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS DATABASE SQL SERVER DETAILS
Question :
Write sql query for retrieving employee names from employee table who are having salary greater than 5000 without using where clause?
Category SQL Server Interview Questions
Rating (0.0) By 0 users
Added on 4/3/2008
Views 600
Rate it!
Answers:

select * from emp group by eno having sal > 5000



select EMPNO, EMPNAME, min(salary) AS SALARY from emp group by empno,empname having min(salary) > 5000



 Posted by: Amit     

Contact Amit   Contact Amit

SELECT EmployeeNo, EmployeeName, MIN(Salary) AS Salary FROM EMPLOYEE
GROUP BY EmployeeNo, EmployeeName
HAVING MIN(Salary) > 5000



 Posted by: Vijaykumar Dolli    

Contact Vijaykumar Dolli  Contact Vijaykumar Dolli


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Explain real time situation where you would use clustered and Non-clustered Indexes?
View Answer
What is the pivot operator in MS SQL Server2005? What is the use of it and how do we use it
View Answer
What are "HINTS"? What is "index covering" of a query?
View Answer
What are data objects?
View Answer
What is the difference between User Identification and Authentication?
View Answer
How to display the table data in XML format using SQL Server.
View Answer
What is XMLA in SQL Server 2005
View Answer
How many types of system privileges are there, Can we add or delete privileges?
View Answer
Write a SQL Stored Procedure to create a GUID and add it to a table. Make that GUID an OUTPUT of that Procedure
View Answer
Can we generate a trigger for two tables? if so what is the query to generate a trigger for two tables employee table and department table with employee having department no.
View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL SQL Server Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/14958/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.02