Hello, the columns in my employee table are as follows.
Emp_id, Emp_Name and Mgr_id.
I'm attempting to develop a view that will display:
Emp name, Emp id, Mgr name, and Mgr id (by cross joining the Employee table). I tried outer join, inner join, and other approaches, but I was unable to solve the problem.
CREATE TABLE [dbo].[tblEmployeeDetails](
[emp_id] [bigint] NOT NULL,
[emp_name] [nvarchar](200) NULL,
[emp_mgr_id] [bigint] NULL, CONSTRAINT [PK_tblEmployeeDetails] PRIMARY KEY CLUSTERED (
[emp_id] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] ) ON [PRIMARY]
Can someone please help me with this?