Department
-----------
salary Deptname
1000 A
3000 A
2000 B
3000 B
4000 C
5000 C

select the deptname where salary >=5000

result should be:
Deptname
---------
C

please post only executed query in SQL server 2005
Asked By: Md. Niyaz

Answers were Sorted based on User's Feedback



Department ----------- salary Deptname 1000 A 3000 A 2000 B 3000 B 4000 C 5000 C sele..

Answer / maulesh

Select Deptname
From Department
Where salary >=5000

Is This Answer Correct ?    10 Yes 0 No

Department ----------- salary Deptname 1000 A 3000 A 2000 B 3000 B 4000 C 5000 C sele..

Answer / praveen s

C

Is This Answer Correct ?    6 Yes 1 No

Department ----------- salary Deptname 1000 A 3000 A 2000 B 3000 B 4000 C 5000 C sele..

Answer / rajkumar

Select Deptname from Department Where salary >=5000

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More SQL Server Interview Questions

can we give the identity for existing column of the table? (already table contains 10(1-10) unique randam records)

2 Answers  


Department ----------- salary Deptname 1000 A 3000 A 2000 B 3000 B 4000 C 5000 C select the deptname where salary >=5000 result should be: Deptname --------- C please post only executed query in SQL server 2005 Asked By: Md. Niyaz

3 Answers  


What is a stored procedure?

3 Answers  


how can you select rexcord(rows) from table A which is not present in Table B . Id being the FK in Table B referencing to ID Table A

0 Answers   United Healthcare,


How to retrieve error messages using odbc_errormsg()?

0 Answers  






WHAT IS THE DIFFERENCE BETWEEN CANDIDATE KEY ,COMPOSITE KEY AND PRIMARY KEY. THAN U.

1 Answers   Synergy,


What is query processing?

0 Answers  


What are the disadvantages of indexes?

0 Answers  


what purpose does OPENXML clause have in sql server stored procedure?

1 Answers  


Lets say due to N/W or Security issues client is not able to connect to server or vice versa. How do you troubleshoot?

1 Answers  


What the class forname () does?

0 Answers  


How to restore performance issues and how to check?

0 Answers  


Categories