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
How can you list all the table constraints in a database?
Explain the purpose of indexes?
What are the types of database recovery models?
When should you use an instead of trigger?
What is a dataset and what are the different types of datasets?
What is openrowset sql server?
How to insert a new row into a table with "insert into" statements in ms sql server?
What are the different authentication modes in sql server? How can it be changed?
How to write a query with a left outer join in ms sql server?
What is a non-clustered index?
How to bind a view to the schema of the underlying tables?
Write a query for primary key constraint with identity key word?
How to get a list of all tables with "sys.tables" view in ms sql server?
What is replace and stuff function in sql server?
How do I find information about the install locations for the various instances running on a computer?