Hi,
I have a table A which has four rows as follows
Table A
-------
empname salary
------- ------
A 1000
B 2000
C 3000
A 1000
B 2000
D 5000
I need the following output:
empname salary
------- ------
A 1000
A 1000
B 2000
B 2000
Thanks in advance
Answer Posted / murtaza
select empname,salary from A
where empname IN ('A','B');
| Is This Answer Correct ? | 3 Yes | 2 No |
Post New Answer View All Answers
create index myindex on mytable(mycolumn) what type of index will get created after executing the above statement? : Sql server database administration
How to see the event list of an existing trigger using sys.trigger_events?
What is merge?
What is application role in sql server database security? : sql server security
What are different types of schemas?
How to backup encryption key ?
What is tempdb in sql server?
What is the difference between the 2 operating modes of database mirroring?
What happens when the SQL Azure database reaches Max Size?
How can we call UDF(User Define Function) using C# code in ASP.net ?
Is foreign key unique?
How to create new table with "create table" statements?
How to store and query spatial data?
What are the different types of cursor?
what is a schema in sql server 2005? Explain how to create a new schema in a database? : Sql server database administration