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

what is replication? where do u use Go Keyword?

1 Answers   Satyam,


Does dbcc checkdb requires db to be in single_user mode? : sql server database administration

0 Answers  


Is there any difference between the primary key and unique key?

0 Answers  


What is Self Join?

4 Answers  


After the SQL installation what are the jobs will you configure?

1 Answers   G7 CR Technologies, IBM, Satyam,






Which is the best place or learning center for MS SQL?????In Bangladesh?????

0 Answers   TCL, Wipro,


how to find 6th highest salary

0 Answers   Chetak Logistics,


How to check table values in sql server?

0 Answers  


What is a SQL Server Temporary Table?

1 Answers   Wipro,


Syntax to find the used space and free space of the Data file in a database(SQL Server). Following queries didn't give the exact Used space and Free Space Information sp_spaceused;DBCC showfilestats;exec MyDbName.dbo.sp_spaceused;SP_HELPFILE Can any one tell me the query for how to find the exact used data file space and free space in a Data File?

2 Answers   Cognizant,


can you any body tell me the difference between candidate key and primary key

4 Answers  


Difference between aggregate functions of sql?

0 Answers   EXL,


Categories