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
Determine when to use stored procedure to complete sql server tasks?
How to rename an existing column with sql server management studio?
How to add a new column to an existing table with "alter table ... Add" in ms sql server?
Which are ddl commands?
Explain the difference between delete,drop and truncate in SQL Server?
What is the difference between varchar and nvarchar?
How to integrate the ssrs reports in application?
Do comments need to go in a special place in sql server 2005?
Explain data warehousing in sql server?
Do you know what are the differences between lost updates and uncommitted dependencies?
What are system databases in ms sql server?
When to use null data driven subscription?
What are extended events in sql server?
Explain triggers in sql?
If user is owning any SQL Objects, can we drop that user