asp.net solutions
EVERY PROBLEM HAS A SOLUTION, Get all the solutions of your asp.net problems here.
Saturday, 24 March 2012
sql query to display parent name as manager if parent id is null
select e2.id,e2.name,isnull(e1.name,'Manager') as parentname
from emp e1
right outer join emp e2 on e2.parentId=e1.Id
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment