Hi First create Employee table
CREATE TABLE EMPLOYEE
(
Sl_no int identity,
Name varchar(40),
Employee_id int
)
insert the values
INSERT INTO EMPLOYEE(Name,Employee_id)
SELECT 'Anil',1001
UNION ALL
SELECT 'Mahesh',1002
UNION ALL
SELECT 'Raju',1003
then create designation table
CREATE TABLE DESIGNATION
(
Employee_id INT,
Designation varchar(30)
)
then insert the values
INSERT INTO DESIGNATION
SELECT 1001, 'Developer'
UNION ALL
SELECT 1002, 'Tester'
UNION ALL
SELECT 1003, 'Trainee'
then follow this query
SELECT E.*,D.Designation FROM EMPLOYEE E INNER JOIN DESIGNATION D ON E.Employee_id=D.Employee_id