| empid ename course |
| 1104 abc btech |
1105 cde java
| 11 05 cde inter | |||
| 1106 efg dotnet |
| empid ename course |
| 1104 abc btech |
| 11 05 cde inter | |||
| 1106 efg dotnet |
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Swapna ChandaPosted Jan 21, 2015, 10:55 PM
Manish Kumar ChoudharyPosted Jan 21, 2015, 10:41 PM
Create TABLE #LocalTempTable(
empid int,
ename varchar(50),
course varchar(150))
insert into #LocalTempTable values ( 1104, 'abc','xyz');
insert into #LocalTempTable values ( 1104, 'abc','xyz');
insert into #LocalTempTable values ( 1104, 'abc','xyz');
insert into #LocalTempTable values ( 1105, 'abc','xyz');
insert into #LocalTempTable values ( 1106, 'abc','xyz');
insert into #LocalTempTable values ( 1105, 'abc','xyz');
insert into #LocalTempTable values ( 1106, 'abc','xyz');
insert into #LocalTempTable values ( 1107, 'abc','xyz');
insert into #LocalTempTable values ( 1108, 'abc','xyz');
SELECT COUNT(DISTINCT empid) FROM #LocalTempTable;